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
{{ message }}
This repository was archived by the owner on May 8, 2025. It is now read-only.
This bazel plugin works well with mypy 0.770 but after upgrading to 0.780 it complains with
"source file found twice under different module names error". mypy 0.780 works fine outside of bazel.
There is a related issue on mypy: python/mypy#8944. In my case, directories on mypy_path do not contain __init__.py files.
I am setting the mypy_path within mypy.ini. Even if I disable that, the problem persists.
Bazel tests pass if I disable the bazel mypy checks (so I think the bazel setup is - mostly - correct).
The template adds $(pwd) to the front of MYPYPATH. I tried playing around with that but still hitting the same issue.
So, I am not very sure where the problem comes from.
EDIT: usually I am setting PYTHONPATH in .bazelrc and mypy_path in mypy.ini but even if I add imports = ["<path e.g. ..>"] in all BUILD files the above steps still apply.