-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix used-before-assignment false positive for TYPE_CHECKING elif branch imports
#8441
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
Merged
Pierre-Sassoulas
merged 38 commits into
pylint-dev:main
from
zenlyj:type-checking-elif-fp
Mar 30, 2023
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
6b77468
Fix used-before-assignment TYPE_CHECKING elif false positive
zenlyj 4d672ed
Add functional test for bug fix
zenlyj e103816
Add changelog
zenlyj 66305e1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 63b69cb
Ignore return value type warning
zenlyj 82fdb4e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b3a4738
Change TYPE_CHECKING used-before-assignment evaluation flow
zenlyj 34f658c
Update functional tests
zenlyj 3acffd5
Remove redundant method
zenlyj c16f437
Merge branch 'main' of https://github.com/PyCQA/pylint into type-checβ¦
zenlyj 8366cf8
Merge branch 'type-checking-elif-fp' of https://github.com/zenlyj/pylβ¦
zenlyj 77fd218
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ad84b85
Resolve CI errors
zenlyj 776993b
Resolve scoping issue
zenlyj c5b5a8f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7e30946
Work around TryFinally node unexpected behavior
zenlyj e82c9ac
Merge branch 'type-checking-elif-fp' of https://github.com/zenlyj/pylβ¦
zenlyj 6bf1e01
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b70834c
Remove redundant check
zenlyj 782fcee
Enable import alias name detection
zenlyj 6a0a735
Add better control flow in name defines method
zenlyj f9afa35
Merge branch 'main' of https://github.com/PyCQA/pylint into type-checβ¦
zenlyj af0632a
Merge branch 'type-checking-elif-fp' of https://github.com/zenlyj/pylβ¦
zenlyj 77ab3a2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f96024a
Resolve CI check fails
zenlyj e8bd3e2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] df51459
Relax check criteria
zenlyj b4bde2a
Merge branch 'main' of https://github.com/PyCQA/pylint into type-checβ¦
zenlyj c2c2491
Merge branch 'type-checking-elif-fp' of https://github.com/zenlyj/pylβ¦
zenlyj 8220d3d
Revert tests restructuring
zenlyj ccb7a67
Remove unnecessary suppression
zenlyj e09fabd
Clean up and add comments
zenlyj 36da654
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 873572b
Apply suggested changes from reviews
zenlyj 258981a
Merge branch 'main' of https://github.com/PyCQA/pylint into type-checβ¦
zenlyj a0a5893
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5969d5e
Merge branch 'main' of https://github.com/PyCQA/pylint into type-checβ¦
zenlyj 05c7f78
Update tests
zenlyj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Fix a ``used-before-assignment`` false positive when imports | ||
| are made under the ``TYPE_CHECKING`` else if branch. | ||
|
|
||
| Closes #8437 |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.