Feature
Disclaimer: I'm not sure this is a feature request or a bug report.
Allow the user to tell mypy where stubs are located but hide the errors found in there.
Pitch
I've generated thousands of stub files (with stubgen) to easily (if crudely) be able to type-check my code. But those files are not fully compliant with mypy's type checks (things like using modules without type checks, redefining variables with values of different types, functions seemingly missing from the scope, etc.). I believe the modules are correct (to the point of usability, at least), and I'm not interested in tuning those files anyway. When more manual .pyi files are created by those package owners, I'll use them instead, but for now I'm happy with the automatically generated stub.
Given that, I get hundreds of errors in my output that are useless to me, and make it harder to spot my own type errors.
However, if I run mypy --mypy-path .mypy_stubs --exclude .mypy_stubs, these errors still appear in the output. I'd like them to be hidden.
My guess is that mypy needs to check the stub files to be able to check my actual source (so they cannot be actually excluded), but the errors could be hidden from the output. Is this something that is reasonable? I could (in theory) try to look at the code and see if I can help with that, but I don't have a lot of experience contributing to open-source code.
Feature
Disclaimer: I'm not sure this is a feature request or a bug report.
Allow the user to tell mypy where stubs are located but hide the errors found in there.
Pitch
I've generated thousands of stub files (with
stubgen) to easily (if crudely) be able to type-check my code. But those files are not fully compliant withmypy's type checks (things like using modules without type checks, redefining variables with values of different types, functions seemingly missing from the scope, etc.). I believe the modules are correct (to the point of usability, at least), and I'm not interested in tuning those files anyway. When more manual.pyifiles are created by those package owners, I'll use them instead, but for now I'm happy with the automatically generated stub.Given that, I get hundreds of errors in my output that are useless to me, and make it harder to spot my own type errors.
However, if I run
mypy --mypy-path .mypy_stubs --exclude .mypy_stubs, these errors still appear in the output. I'd like them to be hidden.My guess is that
mypyneeds to check the stub files to be able to check my actual source (so they cannot be actually excluded), but the errors could be hidden from the output. Is this something that is reasonable? I could (in theory) try to look at the code and see if I can help with that, but I don't have a lot of experience contributing to open-source code.