raise-not-implemented
What it does
Section titled “What it does”Reports a raise of NotImplemented, with or without a call.
Why it matters
Section titled “Why it matters”NotImplemented is the value that binary operators return to say “I cannot do this for that type”. It is not an exception, so raising it fails with a TypeError that hides the real reason.
To fix, raise NotImplementedError.
Example
Section titled “Example”raise NotImplementedraise NotImplemented("a")raise NotImplementedError...Configuration
Section titled “Configuration”python: lint: rules: raise-not-implemented: warn # off, warn (default), errorEnabled by the presets: python/ruff.
Suppress one line with sudsy-disable-next-line raise-not-implemented 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 | F901 |
full |