-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
12 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
crates/ruff_linter/resources/test/fixtures/pyflakes/F401_24/__init__.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,36 @@ | ||
'''__init__.py without __all__ | ||
Stdlib and third party imports are unsafe removals | ||
First party imports get changed to redundant aliases | ||
''' | ||
|
||
|
||
|
||
import os # Ok: is used | ||
_ = os | ||
|
||
|
||
|
||
import sys # F401: remove unused | ||
|
||
|
||
|
||
import used # Ok: is used | ||
_ = used | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
import aliased as aliased # Ok: is redundant alias | ||
|
||
|
||
|
||
import renamed as bees # Ok: is aliased | ||
|
||
|
||
|
||
import unused # F401: change to redundant alias |
Empty file.
Empty file.
Empty file.
Empty file.
40 changes: 40 additions & 0 deletions
40
crates/ruff_linter/resources/test/fixtures/pyflakes/F401_25_dunder_all/__init__.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,40 @@ | ||
'''__init__.py with __all__ | ||
First party imports get added to __all__ | ||
Stdlib and third party imports are unsafe removals | ||
''' | ||
|
||
|
||
|
||
import os # Ok: is used | ||
_ = os | ||
|
||
|
||
|
||
import sys # F401: remove unused | ||
|
||
|
||
|
||
import argparse # Ok: is exported | ||
|
||
|
||
|
||
import used # Ok: is used | ||
_ = used | ||
|
||
|
||
|
||
import aliased as aliased # Ok: is redundant alias | ||
|
||
|
||
|
||
import renamed as bees # Ok: is aliased | ||
|
||
|
||
|
||
import unused # F401: add to __all__ | ||
|
||
|
||
|
||
__all__ = ["argparse"] |
Empty file.
Empty file.
Empty file.
Empty file.
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