-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix possibly-used-before-assignment false negative for type-annotated assignment
#10437
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
Conversation
Pierre-Sassoulas
left a comment
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.
LGTM
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10437 +/- ##
=======================================
Coverage 95.88% 95.88%
=======================================
Files 176 176
Lines 19140 19140
=======================================
Hits 18352 18352
Misses 788 788
π New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
|
Went through primer results, this probably needs to be refined. will make an update soon |
possibly-used-before-assignment false negative for type-annotated assignationpossibly-used-before-assignment false negative for type-annotated assignment
|
π€ According to the primer, this change has no effect on the checked open source code. π€π This comment was generated for commit 646b503 |
Pierre-Sassoulas
left a comment
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.
In 4.0.0 it goes !
Type of Changes
Description
The issue lies in the predicate for variable annotations. It currently checks whether a
Namenode is a child of anAnnAssignnode, but it should also check whether theNamenode is used as type annotation.Closes #10421