Closed jimmyt857 closed 3 months ago
I'd recommend setting follow_imports = silent
in mypy.ini. We should probably default this in the ruleset with arguments to mypy, though.
It looks like you need both follow_imports = silent
and follow_imports_for_stubs = True
, we'll update our default mypy.ini but there's unfortunately no way to fix this on the command line, so if you override mypy.ini you'll need both of these.
Awesome, this worked for me. Thank you!
Hello! First of all I'd like to express appreciation for the project and your time. MyPy type checking is a requirement for our team and we're hoping to retain all of the Bazel optimizations while using it.
I'm trying to onboard and ran into 2 problems (I'll create another issue to track the other problem). When importing
numpy==1.26.4
, I got lots of errors. Here's a small subset:Steps to reproduce: I was able to reproduce this in the example from this repo (
examples/demo
) with the following modifications:numpy==1.26.4
added torequirements.in
.print(np.__version__)
in any of the python files.Expected result: No errors; my code passes mypy checks, it is only the 3p contents that fail.
Actual Result: Lots of errors.
Perhaps there could be an option to skip type-checking third-party libraries, or a recommended set of options for
mypy.ini
?