Derived from the flake8-return linter.
What it does#
else statements with a
raise statement in the preceding
Why is this bad?#
else statement is not needed as the
raise statement will always
break out of the current scope. Removing the
else will reduce nesting
and make the code more readable.