-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
enhancementNew feature or requestNew feature or request
Description
- Date you used flake8-return: 2023-03-16
- flake8-return version used, if any: 1.2.0
- Python version, if any: 3.10.9
- Operating System: Linux
Description
def foo(a):
if ...:
a = 2
return a$ flake8 foo.py --select=R
foo.py:4:12: R504 unnecessary variable assignment before return statement.variables that are function parameters should not be treated as unnecessary, cursory skim of https://github.com/afonasev/flake8-return/blob/master/flake8_return/mixins/unnecessary_assign.py looks like it doesn't look at FunctionDef or AsyncFunctionDef at all which explains it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request