---
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
snapshot_kind: text
---
PYI006.py:8:4: PYI006 Use `<` or `>=` for `sys.version_info` comparisons
   |
 6 | if sys.version_info >= (3, 9): ...  # OK
 7 | 
 8 | if sys.version_info == (3, 9): ...  # OK
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI006
 9 | 
10 | if sys.version_info == (3, 9): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |

PYI006.py:10:4: PYI006 Use `<` or `>=` for `sys.version_info` comparisons
   |
 8 | if sys.version_info == (3, 9): ...  # OK
 9 | 
10 | if sys.version_info == (3, 9): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI006
11 | 
12 | if sys.version_info <= (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |

PYI006.py:12:4: PYI006 Use `<` or `>=` for `sys.version_info` comparisons
   |
10 | if sys.version_info == (3, 9): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
11 | 
12 | if sys.version_info <= (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI006
13 | 
14 | if sys.version_info <= (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |

PYI006.py:14:4: PYI006 Use `<` or `>=` for `sys.version_info` comparisons
   |
12 | if sys.version_info <= (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
13 | 
14 | if sys.version_info <= (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI006
15 | 
16 | if sys.version_info > (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |

PYI006.py:16:4: PYI006 Use `<` or `>=` for `sys.version_info` comparisons
   |
14 | if sys.version_info <= (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
15 | 
16 | if sys.version_info > (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI006
17 | elif sys.version_info > (3, 11): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |

PYI006.py:17:6: PYI006 Use `<` or `>=` for `sys.version_info` comparisons
   |
16 | if sys.version_info > (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
17 | elif sys.version_info > (3, 11): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI006
18 | 
19 | if python_version > (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |

PYI006.py:19:4: PYI006 Use `<` or `>=` for `sys.version_info` comparisons
   |
17 | elif sys.version_info > (3, 11): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
18 | 
19 | if python_version > (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |    ^^^^^^^^^^^^^^^^^^^^^^^^ PYI006
20 | elif python_version == (3, 11): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |

PYI006.py:20:6: PYI006 Use `<` or `>=` for `sys.version_info` comparisons
   |
19 | if python_version > (3, 10): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
20 | elif python_version == (3, 11): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^ PYI006
   |
