Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify motivation for E713 and E714 #11483

Merged
merged 1 commit into from
May 21, 2024

Commits on May 21, 2024

  1. Clarify motivation for E713 and E714

    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
    mnme committed May 21, 2024
    Configuration menu
    Copy the full SHA
    78d999f View commit details
    Browse the repository at this point in the history