Skip to content

not-in-test (E713)#

Derived from the pycodestyle linter.

Fix is always available.

What it does#

Checks for negative comparison using not {foo} in {bar}.

Why is this bad?#

Negative comparison should be done using not in.

Example#

Z = not X in Y
if not X.B in Y:
    pass

Use instead:

Z = X not in Y
if X.B not in Y:
    pass