Skip to content
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

False negatives superfluous-parens with more than one superfluous parenthesis #5361

Open
KotlinIsland opened this issue Nov 22, 2021 · 2 comments
Labels
Enhancement ✨ Improvement to a component False Negative 🦋 No message is emitted but something is wrong with the code Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning

Comments

@KotlinIsland
Copy link
Contributor

KotlinIsland commented Nov 22, 2021

Current problem

for (i) in [1]:  # superfluous-parens
    print(i)

for ((i)) in [1]:  # no warning
    print(i)

Desired solution

warning on both

Additional context

from #5334

@KotlinIsland KotlinIsland added Enhancement ✨ Improvement to a component Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Nov 22, 2021
@KotlinIsland KotlinIsland changed the title False negatives superfluous-parens with more than one superfluous parenthesis False negatives superfluous-parens with more than one superfluous parenthesis Nov 22, 2021
@DanielNoord DanielNoord added False Negative 🦋 No message is emitted but something is wrong with the code and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Feb 9, 2022
@jacobtylerwalls
Copy link
Member

See discussion -- we might be able to revert most of the changes from #4948 to solve this. Just check #4907 for any legitimate cases.

@Pierre-Sassoulas Pierre-Sassoulas added the Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning label Jul 9, 2022
@clavedeluna
Copy link
Collaborator

clavedeluna commented Nov 10, 2022

Investigating this and trying to translate the context into an actionable. Is the new consensus that any test case except the one with startswith(( in tests/functional/s/superfluous_parens.py which contains (( and does not report superfluous-parens should now do so?

@jacobtylerwalls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component False Negative 🦋 No message is emitted but something is wrong with the code Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning
Projects
None yet
Development

No branches or pull requests

5 participants