---
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
---
PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__`
 --> PYI032.pyi:6:29
  |
5 | class Bad:
6 |     def __eq__(self, other: Any) -> bool: ...  # PYI032
  |                             ^^^
7 |     def __ne__(self, other: typing.Any) -> typing.Any: ...  # PYI032
  |
help: Replace with `object`
  |
5 | class Bad:
  -     def __eq__(self, other: Any) -> bool: ...  # PYI032
6 +     def __eq__(self, other: object) -> bool: ...  # PYI032
7 |     def __ne__(self, other: typing.Any) -> typing.Any: ...  # PYI032
  |

PYI032 [*] Prefer `object` to `Any` for the second parameter to `__ne__`
 --> PYI032.pyi:7:29
  |
5 | class Bad:
6 |     def __eq__(self, other: Any) -> bool: ...  # PYI032
7 |     def __ne__(self, other: typing.Any) -> typing.Any: ...  # PYI032
  |                             ^^^^^^^^^^
  |
help: Replace with `object`
  |
6 |     def __eq__(self, other: Any) -> bool: ...  # PYI032
  -     def __ne__(self, other: typing.Any) -> typing.Any: ...  # PYI032
7 +     def __ne__(self, other: object) -> typing.Any: ...  # PYI032
8 |
  |

PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__`
  --> PYI032.pyi:26:28
   |
25 | class BadStringized:
26 |    def __eq__(self, other: "Any") -> bool: ...  # PYI032
   |                            ^^^^^
27 |    def __ne__(self, other: "Any") -> bool: ...  # PYI032
   |
help: Replace with `object`
   |
25 | class BadStringized:
   -    def __eq__(self, other: "Any") -> bool: ...  # PYI032
26 +    def __eq__(self, other: object) -> bool: ...  # PYI032
27 |    def __ne__(self, other: "Any") -> bool: ...  # PYI032
   |

PYI032 [*] Prefer `object` to `Any` for the second parameter to `__ne__`
  --> PYI032.pyi:27:28
   |
25 | class BadStringized:
26 |    def __eq__(self, other: "Any") -> bool: ...  # PYI032
27 |    def __ne__(self, other: "Any") -> bool: ...  # PYI032
   |                            ^^^^^
   |
help: Replace with `object`
   |
26 |    def __eq__(self, other: "Any") -> bool: ...  # PYI032
   -    def __ne__(self, other: "Any") -> bool: ...  # PYI032
27 +    def __ne__(self, other: object) -> bool: ...  # PYI032
   |
