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

ℹ Suggested 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:5: UP036 [*] Version block is outdated for minimum Python version
   |
11 |       if foo:
12 |           pass
13 |       elif sys.version_info < (3, 3):
   |  _____^
14 | |         cmd = [sys.executable, "-m", "test.regrtest"]
   | |_____________________________________________________^ UP036
15 |   
16 |   if True:
   |
   = help: Remove outdated version block

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

UP036_4.py:17:5: UP036 [*] Version block is outdated for minimum Python version
   |
17 |       if foo:
18 |           pass
19 |       elif sys.version_info < (3, 3):
   |  _____^
20 | |         cmd = [sys.executable, "-m", "test.regrtest"]
21 | |     elif foo:
22 | |         cmd = [sys.executable, "-m", "test", "-j0"]
   | |___________________________________________________^ UP036
23 |   
24 |       if foo:
   |
   = help: Remove outdated version block

ℹ Suggested fix
14 14 | if True:
15 15 |     if foo:
16 16 |         pass
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:5: UP036 [*] Version block is outdated for minimum Python version
   |
24 |       if foo:
25 |           pass
26 |       elif sys.version_info < (3, 3):
   |  _____^
27 | |         cmd = [sys.executable, "-m", "test.regrtest"]
   | |_____________________________________________________^ UP036
28 |   
29 |       if sys.version_info < (3, 3):
   |
   = help: Remove outdated version block

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

UP036_4.py:27:5: UP036 [*] Version block is outdated for minimum Python version
   |
27 |           cmd = [sys.executable, "-m", "test.regrtest"]
28 |   
29 |       if sys.version_info < (3, 3):
   |  _____^
30 | |         cmd = [sys.executable, "-m", "test.regrtest"]
   | |_____________________________________________________^ UP036
31 |   
32 |       if foo:
   |
   = help: Remove outdated version block

ℹ Suggested 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 |         pass

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

ℹ Suggested fix
29 29 | 
30 30 |     if foo:
31 31 |         pass
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:5: UP036 [*] Version block is outdated for minimum Python version
   |
37 |           cmd = [sys.executable, "-m", "test", "-j0"]
38 |   
39 |       if sys.version_info < (3, 3):
   |  _____^
40 | |         cmd = [sys.executable, "-m", "test.regrtest"]
41 | |     else:
42 | |         cmd = [sys.executable, "-m", "test", "-j0"]
   | |___________________________________________________^ UP036
43 |   
44 |       if sys.version_info < (3, 3):
   |
   = help: Remove outdated version block

ℹ Suggested 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:5: UP036 [*] Version block is outdated for minimum Python version
   |
42 |           cmd = [sys.executable, "-m", "test", "-j0"]
43 |   
44 |       if sys.version_info < (3, 3):
   |  _____^
45 | |         cmd = [sys.executable, "-m", "test.regrtest"]
46 | |     elif foo:
47 | |         cmd = [sys.executable, "-m", "test", "-j0"]
   | |___________________________________________________^ UP036
   |
   = help: Remove outdated version block

ℹ Suggested 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"]


