-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Add more type hints to the code base #30503
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's really useful. This will make some of my refactorings for AIP-44 show a bit more things that need fixing, but I was actually counting on those to complete the AIP-44, and that would be great if those are merged before.
(pending fixing the static checks/tests of course). |
Some test failures in views. Converting to draft for now since I don’t have time to investigate at the moment. |
I can take a look and fix those if needs be. |
Also fix a bug where create_or_update_pool silently fails when an empty name is given. An error is raised instead now.
This triggers an existing typing bug that pickle_id is incorrectly typed as str in executors, while it should be int in practice. This is fixed to keep things straight.
This uncovers a couple of incorrect type hints in the base SecurityManager (in fab_security), which are also fixed.
This slightly improves how view functions are typechecked and should prevent some trivial bugs.
de23977
to
219a4fa
Compare
OK seems fixed… |
This is mainly driven by eliminating
session=None
usages. And since usingNEW_SESSION
makes many previously untyped functions become typed and checked by Mypy, a cascade of minor type hinting issues are surfaced and fixed in this PR.