-
-
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 a crash when
__all__
exists but cannot be inferred (#8741)
- Loading branch information
1 parent
33d3f22
commit 331e48f
Showing
4 changed files
with
13 additions
and
1 deletion.
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,3 @@ | ||
Fix a crash when ``__all__`` exists but cannot be inferred. | ||
|
||
Closes #8740 |
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
5 changes: 5 additions & 0 deletions
5
tests/functional/u/undefined/undefined_all_variable_edge_case.py
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,5 @@ | ||
"""Edge case: __all__ exists in module's locals, but cannot be inferred. | ||
Other tests for undefined-all-variable in tests/functional/n/names_in__all__.py""" | ||
|
||
__all__ += [] # [undefined-variable] |
1 change: 1 addition & 0 deletions
1
tests/functional/u/undefined/undefined_all_variable_edge_case.txt
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 @@ | ||
undefined-variable:5:0:5:7::Undefined variable '__all__':UNDEFINED |