implicit-return (RET503)
Added in v0.0.154 · Related issues · View source
Derived from the flake8-return linter.
Fix is always available.
What it does
Checks for missing explicit return statements at the end of functions
that can return non-None values.
Why is this bad?
The lack of an explicit return statement at the end of a function that
can return non-None values can cause confusion. Python implicitly returns
None if no other return value is present. Adding an explicit
return None can make the code more readable by clarifying intent.
Example
Use instead: