We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enumerate()
Fairly sure this is not covered by anything, but something I encountered due to autofixing B007.
B007
Given the following example:
for i, s in enumerate("abc"): print(s)
I get the following output:
❯ ruff --version ruff 0.0.241 ❯ ruff --isolated --select B007 bug.py bug.py:1:5: B007 [*] Loop control variable `i` not used within loop body Found 1 error. [*] 1 potentially fixable with the --fix option. ❯ ruff --isolated --select B007 --fix bug.py Found 1 error (1 fixed, 0 remaining). ❯ cat bug.py for _i, s in enumerate("abc"): print(s)
We could probably identify when builtins.enumerate() is being used and autofix to:
builtins.enumerate()
for s in "abc": print(s)
The text was updated successfully, but these errors were encountered:
Ah, this is covered here by FURB148 / no-ignored-enumerate-items.
FURB148
no-ignored-enumerate-items
Sorry, something went wrong.
No branches or pull requests
Fairly sure this is not covered by anything, but something I encountered due to autofixing
B007
.Given the following example:
I get the following output:
We could probably identify when
builtins.enumerate()
is being used and autofix to:The text was updated successfully, but these errors were encountered: