The variable success is changed (or may be changed) inside try/except blocks. However, running flake8 generates the following error: R504 unecessary variable assignement before return statement.
What I Did
$ poetry run flake8 --show-source debug.py
Unable to find qualified name for module: debug.py
debug.py:8:12: R504 unecessary variable assignement before return statement.
return success
^
debug.py:17:12: R504 unecessary variable assignement before return statement.
return success
^
debug.py:27:12: R504 unecessary variable assignement before return statement.
return success
^
Description
Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.
Consider the following functions
The variable
success
is changed (or may be changed) insidetry/except
blocks. However, running flake8 generates the following error:R504 unecessary variable assignement before return statement.
What I Did