---
source: crates/ruff_linter/src/rules/pyflakes/mod.rs
snapshot_kind: text
---
multi_statement_lines.py:2:12: F401 [*] `foo1` imported but unused
  |
1 | if True:
2 |     import foo1; x = 1
  |            ^^^^ F401
3 |     import foo2;     x = 1
  |
  = help: Remove unused import: `foo1`

ℹ Safe fix
1 1 | if True:
2   |-    import foo1; x = 1
  2 |+    x = 1
3 3 |     import foo2;     x = 1
4 4 | 
5 5 | if True:

multi_statement_lines.py:3:12: F401 [*] `foo2` imported but unused
  |
1 | if True:
2 |     import foo1; x = 1
3 |     import foo2;     x = 1
  |            ^^^^ F401
4 | 
5 | if True:
  |
  = help: Remove unused import: `foo2`

ℹ Safe fix
1 1 | if True:
2 2 |     import foo1; x = 1
3   |-    import foo2;     x = 1
  3 |+    x = 1
4 4 | 
5 5 | if True:
6 6 |     import foo3; \

multi_statement_lines.py:6:12: F401 [*] `foo3` imported but unused
  |
5 | if True:
6 |     import foo3; \
  |            ^^^^ F401
7 | x = 1
  |
  = help: Remove unused import: `foo3`

ℹ Safe fix
3 3 |     import foo2;     x = 1
4 4 | 
5 5 | if True:
6   |-    import foo3; \
7   |-x = 1
  6 |+    x = 1
8 7 | 
9 8 | if True:
10 9 |     import foo4 \

multi_statement_lines.py:10:12: F401 [*] `foo4` imported but unused
   |
 9 | if True:
10 |     import foo4 \
   |            ^^^^ F401
11 |         ; x = 1
   |
   = help: Remove unused import: `foo4`

ℹ Safe fix
7  7  | x = 1
8  8  | 
9  9  | if True:
10    |-    import foo4 \
11    |-        ; x = 1
   10 |+    x = 1
12 11 | 
13 12 | if True:
14 13 |     x = 1; import foo5

multi_statement_lines.py:14:19: F401 [*] `foo5` imported but unused
   |
13 | if True:
14 |     x = 1; import foo5
   |                   ^^^^ F401
   |
   = help: Remove unused import: `foo5`

ℹ Safe fix
11 11 |         ; x = 1
12 12 | 
13 13 | if True:
14    |-    x = 1; import foo5
   14 |+    x = 1; 
15 15 | 
16 16 | 
17 17 | if True:

multi_statement_lines.py:19:17: F401 [*] `foo6` imported but unused
   |
17 | if True:
18 |     x = 1; \
19 |          import foo6
   |                 ^^^^ F401
20 | 
21 | if True:
   |
   = help: Remove unused import: `foo6`

ℹ Safe fix
15 15 | 
16 16 | 
17 17 | if True:
18    |-    x = 1; \
19    |-         import foo6
   18 |+    x = 1; 
20 19 | 
21 20 | if True:
22 21 |     x = 1 \

multi_statement_lines.py:23:18: F401 [*] `foo7` imported but unused
   |
21 | if True:
22 |     x = 1 \
23 |         ; import foo7
   |                  ^^^^ F401
24 | 
25 | if True:
   |
   = help: Remove unused import: `foo7`

ℹ Safe fix
20 20 | 
21 21 | if True:
22 22 |     x = 1 \
23    |-        ; import foo7
   23 |+        ; 
24 24 | 
25 25 | if True:
26 26 |     x = 1; import foo8; x = 1

multi_statement_lines.py:26:19: F401 [*] `foo8` imported but unused
   |
25 | if True:
26 |     x = 1; import foo8; x = 1
   |                   ^^^^ F401
27 |     x = 1;     import foo9;     x = 1
   |
   = help: Remove unused import: `foo8`

ℹ Safe fix
23 23 |         ; import foo7
24 24 | 
25 25 | if True:
26    |-    x = 1; import foo8; x = 1
   26 |+    x = 1; x = 1
27 27 |     x = 1;     import foo9;     x = 1
28 28 | 
29 29 | if True:

multi_statement_lines.py:27:23: F401 [*] `foo9` imported but unused
   |
25 | if True:
26 |     x = 1; import foo8; x = 1
27 |     x = 1;     import foo9;     x = 1
   |                       ^^^^ F401
28 | 
29 | if True:
   |
   = help: Remove unused import: `foo9`

ℹ Safe fix
24 24 | 
25 25 | if True:
26 26 |     x = 1; import foo8; x = 1
27    |-    x = 1;     import foo9;     x = 1
   27 |+    x = 1;     x = 1
28 28 | 
29 29 | if True:
30 30 |     x = 1; \

multi_statement_lines.py:31:16: F401 [*] `foo10` imported but unused
   |
29 | if True:
30 |     x = 1; \
31 |         import foo10; \
   |                ^^^^^ F401
32 |     x = 1
   |
   = help: Remove unused import: `foo10`

ℹ Safe fix
28 28 | 
29 29 | if True:
30 30 |     x = 1; \
31    |-        import foo10; \
32    |-    x = 1
   31 |+        x = 1
33 32 | 
34 33 | if True:
35 34 |     x = 1 \

multi_statement_lines.py:36:17: F401 [*] `foo11` imported but unused
   |
34 | if True:
35 |     x = 1 \
36 |         ;import foo11 \
   |                 ^^^^^ F401
37 |         ;x = 1
   |
   = help: Remove unused import: `foo11`

ℹ Safe fix
33 33 | 
34 34 | if True:
35 35 |     x = 1 \
36    |-        ;import foo11 \
37 36 |         ;x = 1
38 37 | 
39 38 | if True:

multi_statement_lines.py:42:16: F401 [*] `foo12` imported but unused
   |
40 |     x = 1; \
41 |         \
42 |         import foo12
   |                ^^^^^ F401
43 | 
44 | if True:
   |
   = help: Remove unused import: `foo12`

ℹ Safe fix
37 37 |         ;x = 1
38 38 | 
39 39 | if True:
40    |-    x = 1; \
41    |-        \
42    |-        import foo12
   40 |+    x = 1; 
43 41 | 
44 42 | if True:
45 43 |     x = 1; \

multi_statement_lines.py:47:12: F401 [*] `foo13` imported but unused
   |
45 |     x = 1; \
46 | \
47 |     import foo13
   |            ^^^^^ F401
   |
   = help: Remove unused import: `foo13`

ℹ Safe fix
42 42 |         import foo12
43 43 | 
44 44 | if True:
45    |-    x = 1; \
46    |-\
47    |-    import foo13
   45 |+    x = 1; 
48 46 | 
49 47 | 
50 48 | if True:

multi_statement_lines.py:53:12: F401 [*] `foo14` imported but unused
   |
51 |     x = 1; \
52 |     #    \
53 |     import foo14
   |            ^^^^^ F401
54 | 
55 | # Continuation, but not as the last content in the file.
   |
   = help: Remove unused import: `foo14`

ℹ Safe fix
50 50 | if True:
51 51 |     x = 1; \
52 52 |     #    \
53    |-    import foo14
54 53 | 
55 54 | # Continuation, but not as the last content in the file.
56 55 | x = 1; \

multi_statement_lines.py:57:8: F401 [*] `foo15` imported but unused
   |
55 | # Continuation, but not as the last content in the file.
56 | x = 1; \
57 | import foo15
   |        ^^^^^ F401
58 | 
59 | # Continuation, followed by end-of-file. (Removing `import foo` would cause a syntax
   |
   = help: Remove unused import: `foo15`

ℹ Safe fix
53 53 |     import foo14
54 54 | 
55 55 | # Continuation, but not as the last content in the file.
56    |-x = 1; \
57    |-import foo15
   56 |+x = 1; 
58 57 | 
59 58 | # Continuation, followed by end-of-file. (Removing `import foo` would cause a syntax
60 59 | # error.)

multi_statement_lines.py:62:8: F401 [*] `foo16` imported but unused
   |
60 | # error.)
61 | x = 1; \
62 | import foo16
   |        ^^^^^ F401
   |
   = help: Remove unused import: `foo16`

ℹ Safe fix
58 58 | 
59 59 | # Continuation, followed by end-of-file. (Removing `import foo` would cause a syntax
60 60 | # error.)
61    |-x = 1; \
62    |-import foo16
   61 |+x = 1;
