-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Missing Imports #28133
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
Comments
Yea I started along this path in #26645 . The hang up on that was some of the internal imports which (maybe?) require stubs. Never went far beyond that so if you want to dive deeper I think still worth exploring |
I think we should create stubs for pyx files. It would be nice if this could be done automatically (@mrocklin wrote http://matthewrocklin.com/blog/work/2017/11/05/cython-everywhere which mentioned use of cython in regular .py files instead of creating .pyx files) if we create the stubs manually, i suspect there would not be an issue keeping them in sync, since changes to the code for .pyx file changes would likely cause mypy to report an error if the stub wasn't updated as well. |
Cool yea I agree with everything you've mentioned above. Article is certainly interesting as well - not sure what limitations there are to that approach but worth exploring if you've got time and interest I think |
I believe we will never be able to set |
In order to close this issue appropriately, I propose that we move forward by setting When this issue was first raised, the choice of In summary, while a fully strict type checking environment (i.e., This approach makes our intention explicit and establishes a clear path forward while still accounting for external constraints. This issue was to discuss and manage that transition and probably should not yet be closed. |
in setup.cfg we currently have
mypy states "We recommend using this approach only as a last resort: it’s equivalent to adding a # type: ignore to all unresolved imports in your codebase." https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
the number of instances of missing imports resolving to Any is already significant..
Ideas for keeping this manageable?
cc @WillAyd
The text was updated successfully, but these errors were encountered: