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

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

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

PYI006 Use `<` or `>=` for `sys.version_info` comparisons
  --> PYI006.py:16:4
   |
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
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^
17 | elif sys.version_info > (3, 11): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |

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

PYI006 Use `<` or `>=` for `sys.version_info` comparisons
  --> PYI006.py:19:4
   |
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
   |    ^^^^^^^^^^^^^^^^^^^^^^^^
20 | elif python_version == (3, 11): ...  # Error: PYI006 Use only `<` and `>=` for version info comparisons
   |

PYI006 Use `<` or `>=` for `sys.version_info` comparisons
  --> PYI006.py:20:6
   |
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
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
