bazel-contrib/bazel-mypy-integration

mypy can't find rule_python requirements

WeiYunKolmostar opened this issue · 1 comments

Hi, I recently meet a problem when using bazel-mypy-integration and I wonder if you have a way to solve it.
I use rule_python to control pip dependencies, but when running mypy check like

bazel build  --aspects @mypy_integration//:mypy.bzl%mypy_aspect --output_groups=mypy //test:test_mypy_with_numpy

with the BUILD file

load("@py_deps//:requirements.bzl", "requirement")

py_library(
    name = 'test_mypy_with_numpy',
    srcs = [test_mypy_with_numpy.py'],
    deps = [
        requirement('numpy'),
    ]

I found numpy related code wasn't checked. But when I use pip install numpy, it will be checked.
So is there any way to let mypy_integration use requirement from rule_python ?

I have added support for PEP-561 stub packages in a separate project as mentioned in this thread: #39