---
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
---
PYI003 Unrecognized `sys.version_info` check
 --> PYI003.pyi:4:4
  |
3 | if sys.version_info[0] == 2: ...
4 | if sys.version_info[0] == True: ...  # Y003 Unrecognized sys.version_info check  # E712 comparison to True should be 'if cond is True:'…
  |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 | if sys.version_info[0.0] == 2: ...  # Y003 Unrecognized sys.version_info check
6 | if sys.version_info[False] == 2: ...  # Y003 Unrecognized sys.version_info check
  |

PYI003 Unrecognized `sys.version_info` check
 --> PYI003.pyi:5:4
  |
3 | if sys.version_info[0] == 2: ...
4 | if sys.version_info[0] == True: ...  # Y003 Unrecognized sys.version_info check  # E712 comparison to True should be 'if cond is True:'…
5 | if sys.version_info[0.0] == 2: ...  # Y003 Unrecognized sys.version_info check
  |    ^^^^^^^^^^^^^^^^^^^^^^^^^^
6 | if sys.version_info[False] == 2: ...  # Y003 Unrecognized sys.version_info check
7 | if sys.version_info[0j] == 2: ...  # Y003 Unrecognized sys.version_info check
  |

PYI003 Unrecognized `sys.version_info` check
 --> PYI003.pyi:6:4
  |
4 | if sys.version_info[0] == True: ...  # Y003 Unrecognized sys.version_info check  # E712 comparison to True should be 'if cond is True:'…
5 | if sys.version_info[0.0] == 2: ...  # Y003 Unrecognized sys.version_info check
6 | if sys.version_info[False] == 2: ...  # Y003 Unrecognized sys.version_info check
  |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | if sys.version_info[0j] == 2: ...  # Y003 Unrecognized sys.version_info check
8 | if sys.version_info[0] == (2, 7): ...  # Y003 Unrecognized sys.version_info check
  |

PYI003 Unrecognized `sys.version_info` check
 --> PYI003.pyi:7:4
  |
5 | if sys.version_info[0.0] == 2: ...  # Y003 Unrecognized sys.version_info check
6 | if sys.version_info[False] == 2: ...  # Y003 Unrecognized sys.version_info check
7 | if sys.version_info[0j] == 2: ...  # Y003 Unrecognized sys.version_info check
  |    ^^^^^^^^^^^^^^^^^^^^^^^^^
8 | if sys.version_info[0] == (2, 7): ...  # Y003 Unrecognized sys.version_info check
9 | if sys.version_info[0] == '2': ...  # Y003 Unrecognized sys.version_info check
  |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:8:4
   |
 6 | if sys.version_info[False] == 2: ...  # Y003 Unrecognized sys.version_info check
 7 | if sys.version_info[0j] == 2: ...  # Y003 Unrecognized sys.version_info check
 8 | if sys.version_info[0] == (2, 7): ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 9 | if sys.version_info[0] == '2': ...  # Y003 Unrecognized sys.version_info check
10 | if sys.version_info[1:] >= (7, 11): ...  # Y003 Unrecognized sys.version_info check
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:9:4
   |
 7 | if sys.version_info[0j] == 2: ...  # Y003 Unrecognized sys.version_info check
 8 | if sys.version_info[0] == (2, 7): ...  # Y003 Unrecognized sys.version_info check
 9 | if sys.version_info[0] == '2': ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^
10 | if sys.version_info[1:] >= (7, 11): ...  # Y003 Unrecognized sys.version_info check
11 | if sys.version_info[::-1] < (11, 7): ...  # Y003 Unrecognized sys.version_info check
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:10:4
   |
 8 | if sys.version_info[0] == (2, 7): ...  # Y003 Unrecognized sys.version_info check
 9 | if sys.version_info[0] == '2': ...  # Y003 Unrecognized sys.version_info check
10 | if sys.version_info[1:] >= (7, 11): ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 | if sys.version_info[::-1] < (11, 7): ...  # Y003 Unrecognized sys.version_info check
12 | if sys.version_info[:3] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:11:4
   |
 9 | if sys.version_info[0] == '2': ...  # Y003 Unrecognized sys.version_info check
10 | if sys.version_info[1:] >= (7, 11): ...  # Y003 Unrecognized sys.version_info check
11 | if sys.version_info[::-1] < (11, 7): ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 | if sys.version_info[:3] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
13 | if sys.version_info[:True] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:12:4
   |
10 | if sys.version_info[1:] >= (7, 11): ...  # Y003 Unrecognized sys.version_info check
11 | if sys.version_info[::-1] < (11, 7): ...  # Y003 Unrecognized sys.version_info check
12 | if sys.version_info[:3] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 | if sys.version_info[:True] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
14 | if sys.version_info[:1] == (2,): ...
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:13:4
   |
11 | if sys.version_info[::-1] < (11, 7): ...  # Y003 Unrecognized sys.version_info check
12 | if sys.version_info[:3] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
13 | if sys.version_info[:True] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 | if sys.version_info[:1] == (2,): ...
15 | if sys.version_info[:1] == (True,): ...  # Y003 Unrecognized sys.version_info check
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:15:4
   |
13 | if sys.version_info[:True] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
14 | if sys.version_info[:1] == (2,): ...
15 | if sys.version_info[:1] == (True,): ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 | if sys.version_info[:1] == (2, 7): ...  # Y005 Version comparison must be against a length-1 tuple
17 | if sys.version_info[:2] == (2, 7): ...
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:19:4
   |
17 | if sys.version_info[:2] == (2, 7): ...
18 | if sys.version_info[:2] == (2,): ...  # Y005 Version comparison must be against a length-2 tuple
19 | if sys.version_info[:2] == "lol": ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 | if sys.version_info[:2.0] >= (3, 9): ...  # Y003 Unrecognized sys.version_info check
21 | if sys.version_info[:2j] >= (3, 9): ...  # Y003 Unrecognized sys.version_info check
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:20:4
   |
18 | if sys.version_info[:2] == (2,): ...  # Y005 Version comparison must be against a length-2 tuple
19 | if sys.version_info[:2] == "lol": ...  # Y003 Unrecognized sys.version_info check
20 | if sys.version_info[:2.0] >= (3, 9): ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21 | if sys.version_info[:2j] >= (3, 9): ...  # Y003 Unrecognized sys.version_info check
22 | if sys.version_info[:, :] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:21:4
   |
19 | if sys.version_info[:2] == "lol": ...  # Y003 Unrecognized sys.version_info check
20 | if sys.version_info[:2.0] >= (3, 9): ...  # Y003 Unrecognized sys.version_info check
21 | if sys.version_info[:2j] >= (3, 9): ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 | if sys.version_info[:, :] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
23 | if sys.version_info < [3, 0]: ...  # Y003 Unrecognized sys.version_info check
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:22:4
   |
20 | if sys.version_info[:2.0] >= (3, 9): ...  # Y003 Unrecognized sys.version_info check
21 | if sys.version_info[:2j] >= (3, 9): ...  # Y003 Unrecognized sys.version_info check
22 | if sys.version_info[:, :] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 | if sys.version_info < [3, 0]: ...  # Y003 Unrecognized sys.version_info check
24 | if sys.version_info < ('3', '0'): ...  # Y003 Unrecognized sys.version_info check
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:23:4
   |
21 | if sys.version_info[:2j] >= (3, 9): ...  # Y003 Unrecognized sys.version_info check
22 | if sys.version_info[:, :] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
23 | if sys.version_info < [3, 0]: ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^
24 | if sys.version_info < ('3', '0'): ...  # Y003 Unrecognized sys.version_info check
25 | if sys.version_info >= (3, 4, 3): ...  # Y004 Version comparison must use only major and minor version
   |

PYI003 Unrecognized `sys.version_info` check
  --> PYI003.pyi:24:4
   |
22 | if sys.version_info[:, :] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
23 | if sys.version_info < [3, 0]: ...  # Y003 Unrecognized sys.version_info check
24 | if sys.version_info < ('3', '0'): ...  # Y003 Unrecognized sys.version_info check
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 | if sys.version_info >= (3, 4, 3): ...  # Y004 Version comparison must use only major and minor version
26 | if sys.version_info == (3, 4): ...  # Y006 Use only < and >= for version comparisons
   |
