-
Notifications
You must be signed in to change notification settings - Fork 66
Closed
Description
- Date you used flake8-return: 2019-05-16
- flake8-return version used, if any: 1.0.0
- Python version, if any: 3.7.1
- Operating System: Debian
Description
The R504 doesn't detect that the variable is conditionally modified prior to return.
What I Did
$ flake8 test.py
test.py:5:12: R504 you shouldn`t assign value to variable if it will be use only as return value
$ cat test.py
def foo(bar):
value = []
if bar:
value = value[:1]
return value
Metadata
Metadata
Assignees
Labels
No labels