You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our project uses --explicit-package-bases and the default --namespace-packages. It seems like with these options, mypy will use a directory specified in MYPYPATH over a directory relative to CWD. rules_mypy creates .mypy_cache/ at bazel-out/*-fastbuild-*/bin/path/to/dir/dir.mypy_cache/ AND adds bazel-out/*-fastbuild-*/bin to MYPYPATH, causing it to find that directory instead of the path/to/dir/foo.py file in the standard file system.
I see generated_dirs is used to construct generated_import_dirs
Uh oh!
There was an error while loading. Please reload this page.
Our project uses
--explicit-package-bases
and the default--namespace-packages
. It seems like with these options, mypy will use a directory specified inMYPYPATH
over a directory relative to CWD.rules_mypy
creates.mypy_cache/
atbazel-out/*-fastbuild-*/bin/path/to/dir/dir.mypy_cache/
AND addsbazel-out/*-fastbuild-*/bin
to MYPYPATH, causing it to find that directory instead of thepath/to/dir/foo.py
file in the standard file system.I see
generated_dirs
is used to constructgenerated_import_dirs
rules_mypy/mypy/private/mypy.bzl
Lines 140 to 143 in da53ac1
Is there a reason why
generated_dirs
is added to MYPYPATH in addition togenerated_import_dirs
?Related: python/mypy#19129
The text was updated successfully, but these errors were encountered: