not-in-test
What it does
Section titled “What it does”Reports a membership test negated in front of the expression: not a in b.
Why it matters
Section titled “Why it matters”a not in b is the operator for it. The prefix form is the same test, but a reader may take it as (not a) in b.
To fix, write a not in b.
Example
Section titled “Example”a = b = 1not a in bnot a not in ba not in bnot (a in b)Configuration
Section titled “Configuration”python: lint: rules: not-in-test: warn # off (default), warn, errorSuppress one line with sudsy-disable-next-line not-in-test in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| ruff | E713 |
full |