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