-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix false positive for 'used-before-assignment' with terminating func #7784
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
Pull Request Test Coverage Report for Build 3491561420
π - Coveralls |
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.
The refactor is a nice touch π
Primer failure reminds me of when primer had a legit error but it didn't show up in CI, so I'll run locally when I can and report back. |
d492531
to
64ddfa7
Compare
π€ According to the primer, this change has no effect on the checked open source code. π€π This comment was generated for commit 64ddfa7 |
Not back-porting because of a refactor in |
): | ||
return False | ||
|
||
qnames = {"_sitebuiltins.Quitter", "sys.exit", "posix._exit", "nt._exit"} |
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.
Small nit: This could be a global, maybe even a frozenset
. That would be a small performance improvement.
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.
Type of Changes
Description
Closes #7563
If a terminating func such as sys.exit, quit, etc is used in an else statement,
used-before-assignment
should not be flagged.