Add /src explicitly to MYPY_PATH

Newer versions of Mypy seems to prefer packages in the site-packages
directory over those found in the project directory. This causes issues
if Mypy is installed in an environment that has an older pip version
present, e.g. pre-commit. Adding our pip into MYPY_PATH seems to fix
the issue.
This commit is contained in:
Tzu-ping Chung 2022-07-22 16:51:19 +08:00
parent a3c8bb6778
commit c611db6514
1 changed files with 1 additions and 0 deletions

View File

@ -35,6 +35,7 @@ per-file-ignores =
tests/*: B011
[mypy]
mypy_path = $MYPY_CONFIG_FILE_DIR/src
ignore_missing_imports = True
disallow_untyped_defs = True
disallow_any_generics = True