---
source: crates/ruff_linter/src/rules/pyupgrade/mod.rs
---
UP036_4.py:4:8: UP036 [*] Version block is outdated for minimum Python version
  |
3 | if True:
4 |     if sys.version_info < (3, 3):
  |        ^^^^^^^^^^^^^^^^^^^^^^^^^ UP036
5 |         cmd = [sys.executable, "-m", "test.regrtest"]
  |
  = help: Remove outdated version block

ℹ Unsafe fix
1 1 | import sys
2 2 | 
3 3 | if True:
4   |-    if sys.version_info < (3, 3):
5   |-        cmd = [sys.executable, "-m", "test.regrtest"]
  4 |+    pass
6 5 | 
7 6 | 
8 7 | if True:

UP036_4.py:11:10: UP036 [*] Version block is outdated for minimum Python version
   |
 9 |     if foo:
10 |         print()
11 |     elif sys.version_info < (3, 3):
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ UP036
12 |         cmd = [sys.executable, "-m", "test.regrtest"]
   |
   = help: Remove outdated version block

ℹ Unsafe fix
8  8  | if True:
9  9  |     if foo:
10 10 |         print()
11    |-    elif sys.version_info < (3, 3):
12    |-        cmd = [sys.executable, "-m", "test.regrtest"]
   11 |+    
13 12 | 
14 13 | if True:
15 14 |     if foo:

UP036_4.py:17:10: UP036 [*] Version block is outdated for minimum Python version
   |
15 |     if foo:
16 |         print()
17 |     elif sys.version_info < (3, 3):
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ UP036
18 |         cmd = [sys.executable, "-m", "test.regrtest"]
19 |     elif foo:
   |
   = help: Remove outdated version block

ℹ Unsafe fix
14 14 | if True:
15 15 |     if foo:
16 16 |         print()
17    |-    elif sys.version_info < (3, 3):
18    |-        cmd = [sys.executable, "-m", "test.regrtest"]
19 17 |     elif foo:
20 18 |         cmd = [sys.executable, "-m", "test", "-j0"]
21 19 | 

UP036_4.py:24:10: UP036 [*] Version block is outdated for minimum Python version
   |
22 |     if foo:
23 |         print()
24 |     elif sys.version_info < (3, 3):
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ UP036
25 |         cmd = [sys.executable, "-m", "test.regrtest"]
   |
   = help: Remove outdated version block

ℹ Unsafe fix
21 21 | 
22 22 |     if foo:
23 23 |         print()
24    |-    elif sys.version_info < (3, 3):
25    |-        cmd = [sys.executable, "-m", "test.regrtest"]
   24 |+    
26 25 | 
27 26 |     if sys.version_info < (3, 3):
28 27 |         cmd = [sys.executable, "-m", "test.regrtest"]

UP036_4.py:27:8: UP036 [*] Version block is outdated for minimum Python version
   |
25 |         cmd = [sys.executable, "-m", "test.regrtest"]
26 | 
27 |     if sys.version_info < (3, 3):
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^ UP036
28 |         cmd = [sys.executable, "-m", "test.regrtest"]
   |
   = help: Remove outdated version block

ℹ Unsafe fix
24 24 |     elif sys.version_info < (3, 3):
25 25 |         cmd = [sys.executable, "-m", "test.regrtest"]
26 26 | 
27    |-    if sys.version_info < (3, 3):
28    |-        cmd = [sys.executable, "-m", "test.regrtest"]
29 27 | 
30 28 |     if foo:
31 29 |         print()

UP036_4.py:32:10: UP036 [*] Version block is outdated for minimum Python version
   |
30 |     if foo:
31 |         print()
32 |     elif sys.version_info < (3, 3):
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ UP036
33 |         cmd = [sys.executable, "-m", "test.regrtest"]
34 |     else:
   |
   = help: Remove outdated version block

ℹ Unsafe fix
29 29 | 
30 30 |     if foo:
31 31 |         print()
32    |-    elif sys.version_info < (3, 3):
33    |-        cmd = [sys.executable, "-m", "test.regrtest"]
34 32 |     else:
35 33 |         cmd = [sys.executable, "-m", "test", "-j0"]
36 34 | 

UP036_4.py:37:8: UP036 [*] Version block is outdated for minimum Python version
   |
35 |         cmd = [sys.executable, "-m", "test", "-j0"]
36 | 
37 |     if sys.version_info < (3, 3):
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^ UP036
38 |         cmd = [sys.executable, "-m", "test.regrtest"]
39 |     else:
   |
   = help: Remove outdated version block

ℹ Unsafe fix
34 34 |     else:
35 35 |         cmd = [sys.executable, "-m", "test", "-j0"]
36 36 | 
37    |-    if sys.version_info < (3, 3):
38    |-        cmd = [sys.executable, "-m", "test.regrtest"]
39    |-    else:
40    |-        cmd = [sys.executable, "-m", "test", "-j0"]
   37 |+    cmd = [sys.executable, "-m", "test", "-j0"]
41 38 | 
42 39 |     if sys.version_info < (3, 3):
43 40 |         cmd = [sys.executable, "-m", "test.regrtest"]

UP036_4.py:42:8: UP036 [*] Version block is outdated for minimum Python version
   |
40 |         cmd = [sys.executable, "-m", "test", "-j0"]
41 | 
42 |     if sys.version_info < (3, 3):
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^ UP036
43 |         cmd = [sys.executable, "-m", "test.regrtest"]
44 |     elif foo:
   |
   = help: Remove outdated version block

ℹ Unsafe fix
39 39 |     else:
40 40 |         cmd = [sys.executable, "-m", "test", "-j0"]
41 41 | 
42    |-    if sys.version_info < (3, 3):
43    |-        cmd = [sys.executable, "-m", "test.regrtest"]
44    |-    elif foo:
   42 |+    if foo:
45 43 |         cmd = [sys.executable, "-m", "test", "-j0"]


