Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mypy can't find rule_python requirements #65

Open
WeiYunKolmostar opened this issue Sep 19, 2022 · 1 comment
Open

mypy can't find rule_python requirements #65

WeiYunKolmostar opened this issue Sep 19, 2022 · 1 comment

Comments

@WeiYunKolmostar
Copy link

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 ?

@alexmirrington
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants