-
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.
Mark
__all__
members as used at end-of-scope (#2733)
- Loading branch information
1 parent
3d650f9
commit 0377834
Showing
4 changed files
with
100 additions
and
58 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 @@ | ||
"""Test: late-binding of `__all__`.""" | ||
|
||
__all__ = ("bar",) | ||
from foo import bar, baz |
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
26 changes: 26 additions & 0 deletions
26
crates/ruff/src/rules/pyflakes/snapshots/ruff__rules__pyflakes__tests__F401_F401_9.py.snap
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,26 @@ | ||
--- | ||
source: crates/ruff/src/rules/pyflakes/mod.rs | ||
expression: diagnostics | ||
--- | ||
- kind: | ||
UnusedImport: | ||
name: foo.baz | ||
ignore_init: false | ||
multiple: false | ||
location: | ||
row: 4 | ||
column: 21 | ||
end_location: | ||
row: 4 | ||
column: 24 | ||
fix: | ||
content: | ||
- from foo import bar | ||
location: | ||
row: 4 | ||
column: 0 | ||
end_location: | ||
row: 4 | ||
column: 24 | ||
parent: ~ | ||
|