needless-else (RUF047)
Preview (since 0.9.3) · Related issues · View source
Fix is always available.
This rule is unstable and in preview. The --preview flag is required for use.
What it does
Checks for else clauses that only contains pass and ... statements.
Why is this bad?
Such an else clause does nothing and can be removed.
Example
Use instead: