diff --git a/crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__F401_F401_24____init__.py.snap b/crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__F401_F401_24____init__.py.snap new file mode 100644 index 00000000000000..60b5c1c8f0e2d3 --- /dev/null +++ b/crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__F401_F401_24____init__.py.snap @@ -0,0 +1,42 @@ +--- +source: crates/ruff_linter/src/rules/pyflakes/mod.rs +--- +__init__.py:23:8: F401 [*] `sys` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + | +23 | import sys # F401: remove unused + | ^^^ F401 + | + = help: Remove unused import: `sys` + +ℹ Unsafe fix +20 20 | +21 21 | +22 22 | +23 |-import sys # F401: remove unused +24 23 | +25 24 | +26 25 | + +__init__.py:43:15: F401 [*] `.unused` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + | +43 | from . import unused # F401: change to redundant alias + | ^^^^^^ F401 + | + = help: Remove unused import: `.unused` + +ℹ Safe fix +40 40 | +41 41 | +42 42 | +43 |-from . import unused # F401: change to redundant alias + 43 |+from . import unused as unused # F401: change to redundant alias +44 44 | +45 45 | +46 46 | + +__init__.py:47:26: F401 `.renamed` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + | +47 | from . import renamed as bees # F401: no fix + | ^^^^ F401 + | + = help: Remove unused import: `.renamed` diff --git a/crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__F401_F401_25__all____init__.py.snap b/crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__F401_F401_25__all____init__.py.snap new file mode 100644 index 00000000000000..4877e5328a1c58 --- /dev/null +++ b/crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__F401_F401_25__all____init__.py.snap @@ -0,0 +1,18 @@ +--- +source: crates/ruff_linter/src/rules/pyflakes/mod.rs +--- +__init__.py:23:8: F401 [*] `sys` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + | +23 | import sys # F401: remove unused + | ^^^ F401 + | + = help: Remove unused import: `sys` + +ℹ Unsafe fix +20 20 | +21 21 | +22 22 | +23 |-import sys # F401: remove unused +24 23 | +25 24 | +26 25 | diff --git a/crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__init.snap b/crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__init.snap index 3792cb39ddeaa1..f141588829c770 100644 --- a/crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__init.snap +++ b/crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__init.snap @@ -1,7 +1,7 @@ --- source: crates/ruff_linter/src/rules/pyflakes/mod.rs --- -__init__.py:1:8: F401 `os` imported but unused; consider removing, adding to `__all__`, or using a redundant alias +__init__.py:1:8: F401 [*] `os` imported but unused; consider removing, adding to `__all__`, or using a redundant alias | 1 | import os | ^^ F401 @@ -9,3 +9,9 @@ __init__.py:1:8: F401 `os` imported but unused; consider removing, adding to `__ 3 | print(__path__) | = help: Remove unused import: `os` + +ℹ Unsafe fix +1 |-import os +2 1 | +3 2 | print(__path__) +4 3 |