Uh oh!
There was an error while loading. Please reload this page.
Add more type hints to the code base - #30503
Merged
Merged
Conversation
uranusjr
requested review from
XD-DENG, ashb, bbovenzi, dstandish, ephraimbuddy, jedcunningham, jhtimmins, kaxil, o-nikolas, potiuk and ryanahamilton
as code ownersApril 6, 2023 11:46
potiuk
approved these changes
Apr 6, 2023
potiuk
left a comment
Member
There was a problem hiding this comment.
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.
uranusjr
marked this pull request as draft
April 6, 2023 12:20
potiuk
commented
Apr 6, 2023
Member
(pending fixing the static checks/tests of course). |
uranusjr
commented
Apr 6, 2023
MemberAuthor
Some test failures in views. Converting to draft for now since I don’t have time to investigate at the moment. |
potiuk
commented
Apr 6, 2023
Member
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.
uranusjr
commented
Apr 6, 2023
MemberAuthor
OK seems fixed… |
uranusjr
marked this pull request as ready for review
April 6, 2023 17:51
potiuk
approved these changes
Apr 7, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is mainly driven by eliminating
session=Noneusages. And since usingNEW_SESSIONmakes many previously untyped functions become typed and checked by Mypy, a cascade of minor type hinting issues are surfaced and fixed in this PR.