except-with-non-exception-classes (B030)
Added in v0.0.255 · Related issues · View source
Derived from the flake8-bugbear linter.
What it does
Checks for exception handlers that catch non-exception classes.
Why is this bad?
Catching classes that do not inherit from BaseException will raise a
TypeError.
Example
Use instead: