-
-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
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
Detect redundant enumerate #1825
Comments
The same can be applied to dctnr = {1: 2, 3: 4}
for _, value in dctnr.items():
...
for key, _ in dctnr.items():
... |
I will leave this one for |
It will be false-positive only if you have shadowed |
Yes, my bad! I was confused by: dctnr = {1: 2, 3: 4}
for _, value in dctnr.items():
...
for key, _ in dctnr.items():
... This should go to |
Hello, I am a beginner in the Open source world and I found this issue to be good first so I would like to take this issue. So please guide me. |
Hi @ujju20! Make sure to read our contributing guides Next, you will need to create a new I am here to help: ask anything you need. |
If this is not taken by anybody, can I take it over? |
Sure, go on :) |
* Add 'redundant enumerate()' violation. Closes #1825 * Simplify type signature for RedundantEnumerateVisitor using AnyFor. * Add proper processing of comprehensions and generator expressions to 'RedundantEnumerateVisitor'. * Revert unrelated change to a test snapshot.
Rule request
Thesis
Reasoning
Simplification.
P.S. I'm not making it, have seen it in the wild 🙃
The text was updated successfully, but these errors were encountered: