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
An older issue (#890) called out this behavior as fixed, but it appears to be reintroduced in ruff 0.4.7. The following code snippet gives an error on F841:
ruff_test.py:5:3: F841 Local variable `total` is assigned to but never used
|
4 | def foo():
5 | total, results = paginate()
| ^^^^^ F841
6 | return results
|
= help: Remove assignment to unused variable `total`
Found 1 error.
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).
The error goes away by prefixing total with _. Is this now the required recommendation for unused tuple unpacking args? I noticed that for loops do not exhibit this error. E.g.
foriinrange(100):
print('foo')
this does not report an error
The text was updated successfully, but these errors were encountered:
An older issue (#890) called out this behavior as fixed, but it appears to be reintroduced in
ruff 0.4.7
. The following code snippet gives an error onF841
:ruff check ruff_test.py
The error goes away by prefixing
total
with_
. Is this now the required recommendation for unused tuple unpacking args? I noticed that for loops do not exhibit this error. E.g.this does not report an error
The text was updated successfully, but these errors were encountered: