This repository was archived by the owner on May 8, 2025. It is now read-only.
This repository was archived by the owner on May 8, 2025. It is now read-only.
Support including .pyi alongside .py files (eg. foo/bar.py and foo/bar.pyi) #4
Closed
Description
In MyPy if you have a .py
and .pyi
file in the same folder with the same name then MyPy says that the .pyi
should take precedence and the .py
is ignored completely during type-checking.
In a branch, https://github.com/thundergolfer/bazel-mypy-integration/tree/jonathon/supporting-pyi-files, I was passing in both to the --cache-map
and it was throwing out the error:
mypy_stubs/parse_name.pyi: error: Duplicate module named 'mypy_stubs.parse_name' (also at 'mypy_stubs/parse_name.py')
If could in my Starlark code check for this case and then ignore the .py
, but for now I think I just won't support those kinds of .pyi
files.
Open issue about this: python/mypy#3505
Metadata
Metadata
Assignees
Labels
No labels