---
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
snapshot_kind: text
---
PYI002.pyi:3:4: PYI002 `if` test must be a simple comparison against `sys.platform` or `sys.version_info`
  |
1 | import sys
2 | 
3 | if sys.version == 'Python 2.7.10': ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
  |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI002
4 | if 'linux' == sys.platform: ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
5 | if hasattr(sys, 'maxint'): ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
  |

PYI002.pyi:4:4: PYI002 `if` test must be a simple comparison against `sys.platform` or `sys.version_info`
  |
3 | if sys.version == 'Python 2.7.10': ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
4 | if 'linux' == sys.platform: ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
  |    ^^^^^^^^^^^^^^^^^^^^^^^ PYI002
5 | if hasattr(sys, 'maxint'): ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
6 | if sys.maxsize == 42: ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
  |

PYI002.pyi:5:4: PYI002 `if` test must be a simple comparison against `sys.platform` or `sys.version_info`
  |
3 | if sys.version == 'Python 2.7.10': ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
4 | if 'linux' == sys.platform: ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
5 | if hasattr(sys, 'maxint'): ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
  |    ^^^^^^^^^^^^^^^^^^^^^^ PYI002
6 | if sys.maxsize == 42: ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
  |

PYI002.pyi:6:4: PYI002 `if` test must be a simple comparison against `sys.platform` or `sys.version_info`
  |
4 | if 'linux' == sys.platform: ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
5 | if hasattr(sys, 'maxint'): ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
6 | if sys.maxsize == 42: ...  # Y002 If test must be a simple comparison against sys.platform or sys.version_info
  |    ^^^^^^^^^^^^^^^^^ PYI002
  |
