-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
used-before-assignment
if conditional imports guarded again whe…
- Loading branch information
1 parent
1ded4d0
commit c3d7b39
Showing
4 changed files
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 @@ | ||
Prevent ``used-before-assignment`` when imports guarded by ``if TYPE_CHECKING`` | ||
are guarded again when used. | ||
|
||
Closes #7979 |
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
undefined-variable:14:21:14:28:MyClass.incorrect_typing_method:Undefined variable 'MyClass':UNDEFINED | ||
undefined-variable:19:26:19:33:MyClass.incorrect_nested_typing_method:Undefined variable 'MyClass':UNDEFINED | ||
undefined-variable:24:20:24:27:MyClass.incorrect_default_method:Undefined variable 'MyClass':UNDEFINED | ||
used-before-assignment:88:20:88:28:VariableAnnotationsGuardedByTypeChecking:Using variable 'datetime' before assignment:HIGH | ||
undefined-variable:15:21:15:28:MyClass.incorrect_typing_method:Undefined variable 'MyClass':UNDEFINED | ||
undefined-variable:20:26:20:33:MyClass.incorrect_nested_typing_method:Undefined variable 'MyClass':UNDEFINED | ||
undefined-variable:25:20:25:27:MyClass.incorrect_default_method:Undefined variable 'MyClass':UNDEFINED | ||
used-before-assignment:89:20:89:28:VariableAnnotationsGuardedByTypeChecking:Using variable 'datetime' before assignment:HIGH |