Derived from the flake8-pyi linter.
Fix is always available.
What it does#
__ne__ implementations that use
the type annotation for the
Why is this bad?#
The Python documentation recommends the use of
object to "indicate that a
value could be any type in a typesafe manner", while
Any should be used to
"indicate that a value is dynamically typed."
The semantics of
__ne__ are such that the
should be any type, as opposed to a dynamically typed value. Therefore, the
object type annotation is more appropriate.