Skip to content

Commit

Permalink
mypy: No longer ignore missing import and checks all files in one go
Browse files Browse the repository at this point in the history
  • Loading branch information
igo95862 committed Jun 11, 2022
1 parent da8d614 commit cc70773
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tools/run_py_linters.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@
mypy_cache_dir = build_dir / '.mypy_cache'


def run_mypy(path: Path) -> None:
print(f"Running mypy on {path}")
def run_mypy() -> None:
print('Running mypy on all modules')
run(
args=(
'mypy', '--strict',
'--cache-dir', mypy_cache_dir,
'--python-version', '3.8',
'--namespace-packages',
'--ignore-missing-imports',
path,
'--explicit-package-bases',
*all_python_modules,
),
check=True,
env={'MYPYPATH': str(src_dir.absolute()), **environ},
Expand All @@ -69,8 +69,7 @@ def linter_main() -> None:
check=True,
)

for x in all_python_modules:
run_mypy(x)
run_mypy()


def get_all_python_files() -> List[Path]:
Expand Down

0 comments on commit cc70773

Please sign in to comment.