ruff
84531d16 - Clarify motivation for E713 and E714 (#11483)

Commit
1 year ago
Clarify motivation for E713 and E714 (#11483) The wording 'negative comparison' is a rather vague description of the 'is not' operation and does not describe what the 'not in' operation does (potentially copied from 'is not'). This was replaced with more precise language to describe the operators taken from the official python docs[1]. Both rules didn't have a strong reasoning besides 'it's bad, use the other'. The origin of these rules seems to be PEP8[2] which prefers 'is not' over 'not ... is' for readability. This is now reflected in the description. [1]: https://docs.python.org/3/reference/expressions.html#membership-test-operations [2]: https://peps.python.org/pep-0008/#programming-recommendations
Author
Parents
Loading