wrong-tuple-length-version-comparison (PYI005)
Derived from the flake8-pyi linter.
What it does
Checks for Python version comparisons that compare against a tuple of the wrong length.
Why is this bad?
Stub files support simple conditionals to test for differences in Python
versions and platforms. When comparing against sys.version_info
, avoid
comparing against tuples of the wrong length, which can lead to unexpected
behavior.
Example
Use instead: