---
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
---
PYI003.pyi:4:4: PYI003 Unrecognized `sys.version_info` check
  |
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:' or 'if cond:'
  |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI003
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.pyi:5:4: PYI003 Unrecognized `sys.version_info` check
  |
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:' or 'if cond:'
5 | if sys.version_info[0.0] == 2: ...  # Y003 Unrecognized sys.version_info check
  |    ^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI003
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.pyi:6:4: PYI003 Unrecognized `sys.version_info` check
  |
4 | if sys.version_info[0] == True: ...  # Y003 Unrecognized sys.version_info check  # E712 comparison to True should be 'if cond is True:' or 'if cond:'
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
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.pyi:7:4: PYI003 Unrecognized `sys.version_info` check
  |
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
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.pyi:8:4: PYI003 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
 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.pyi:9:4: PYI003 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
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.pyi:10:4: PYI003 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
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.pyi:11:4: PYI003 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
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.pyi:12:4: PYI003 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
13 | if sys.version_info[:True] >= (2, 7): ...  # Y003 Unrecognized sys.version_info check
14 | if sys.version_info[:1] == (2,): ...
   |

PYI003.pyi:13:4: PYI003 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
14 | if sys.version_info[:1] == (2,): ...
15 | if sys.version_info[:1] == (True,): ...  # Y003 Unrecognized sys.version_info check
   |

PYI003.pyi:15:4: PYI003 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
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.pyi:19:4: PYI003 Unrecognized `sys.version_info` check
   |
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
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI003
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.pyi:20:4: PYI003 Unrecognized `sys.version_info` check
   |
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
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI003
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.pyi:21:4: PYI003 Unrecognized `sys.version_info` check
   |
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
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.pyi:22:4: PYI003 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
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.pyi:23:4: PYI003 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
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.pyi:24:4: PYI003 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
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
   |


