---
source: crates/ruff_linter/src/rules/pyflakes/mod.rs
---
<filename>:2:8: F401 [*] `os` imported but unused
  |
2 | import os
  |        ^^ F401
3 | 
4 | def f():
  |
  = help: Remove unused import: `os`

ℹ Safe fix
1 1 | 
2   |-import os
3 2 | 
4 3 | def f():
5 4 |     import os

<filename>:5:12: F811 [*] Redefinition of unused `os` from line 2
  |
4 | def f():
5 |     import os
  |            ^^ F811
6 | 
7 |     # Despite this `del`, `import os` in `f` should still be flagged as shadowing an unused
  |
  = help: Remove definition: `os`

ℹ Safe fix
2 2 | import os
3 3 | 
4 4 | def f():
5   |-    import os
6 5 | 
7 6 |     # Despite this `del`, `import os` in `f` should still be flagged as shadowing an unused
8 7 |     # import.


