You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
autoflake --remove-unused-variables option should not remove variable with names starting with underscore. Or at least they it should give an opt-in feature.
For test file t.py as follows
deffetch_user(value):
"let's say it returns user or raises Exception when user isn't found"return {"pk": 2}
deffetch_settings(value):
"let's say it returns user settings or raises Exception when settings isn't found"return {"pk": 3}
defcheck_user_regn_complete(value):
user=fetch_user(value)
_settings=fetch_settings(value)
Result of running autoflake --remove-unused-variables t.py
autoflake --remove-unused-variables option should not remove variable with names starting with underscore. Or at least they it should give an opt-in feature.
For test file
t.py
as followsResult of running
autoflake --remove-unused-variables t.py
Assignment to variable
_settings
is a good practice as opposed to not assigning it at all.Expected result:
The text was updated successfully, but these errors were encountered: