In python/typeshed#13309 I found that the following rules can be in conflict:
Example:
import sys
if sys.version_info >= (3, 11): # SIM114
OP_IGNORE_UNEXPECTED_EOF: int
elif sys.version_info >= (3, 8) and sys.platform == "linux":
OP_IGNORE_UNEXPECTED_EOF: int
import sys
if sys.version_info >= (3, 11) or (sys.version_info >= (3, 8) and sys.platform == "linux"): # PYI002
OP_IGNORE_UNEXPECTED_EOF: int
What would the recommendation be here? Could either rule be adapted so they work together ?
In this specific case, granted that typeshed's oldest supported Python version is 3.8, this could be adapted to:
import sys
if sys.version_info >= (3, 11) or sys.platform == "linux":
OP_IGNORE_UNEXPECTED_EOF: int
But the underlying issue still exists.
Ruff 0.8.4