Skip to content

Commit

Permalink
[ruff F401 #10390 #10391] cargo insta review
Browse files Browse the repository at this point in the history
  • Loading branch information
plredmond committed Apr 29, 2024
1 parent bc55ca8 commit d9d863e
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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`
Original file line number Diff line number Diff line change
@@ -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 |
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
---
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
2 |
3 | print(__path__)
|
= help: Remove unused import: `os`

Unsafe fix
1 |-import os
2 1 |
3 2 | print(__path__)
4 3 |

0 comments on commit d9d863e

Please sign in to comment.