Derived from the flake8-return linter.
Fix is always available.
What it does#
Checks for the presence of a
return statement with no explicit value,
for functions that return non-
None values elsewhere.
Why is this bad?#
return statement with no explicit value can cause confusion
return statements in the function return non-
Python implicitly assumes return
None if no other return value is present.
Adding an explicit
return None can make the code more readable by clarifying