-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 superfluous parenthesis on function call
#5334
Comments
We actually had a similar checker (contributed by me), which I removed in #4948 It is actually (almost) impossible to determine when a tuple with inner tuple is superfluous or when it is intended. We risk throwing a lot of false positives for valid use cases of inner tuples. We could make a check that checks whether the tuples are in a non-sensical place, such as the |
Please read #4907 before participating to the discussion in this issue. |
@DanielNoord is 'superfluous-parens' removed entirely? I can't get it to trigger under any circumstances. Your comment suggests that it is removed, but that's not in the changelog and 'superfluous-parens' is listed in the enabled messages. |
OHHHHHHHHHHHHH, it only detects single unnecessary parens for (i) in ([1]): # superfluous-parens
print(i)
for ((i)) in (([1])): # no warning
print(i) |
Oh, I think you might have found a nice first step towards this: Looking at your example that is currently not the case! |
superfluous-parens
with more than one superfluous parenthesis
This seems like something that would be absurdly simple if a CST was used instead of analyzing the raw tokens. |
superfluous-parens
with more than one superfluous parenthesissuperfluous-parens
with superfluous parenthesis on function call
Current problem
This looks cringe to me. I want a pylint warning.
The text was updated successfully, but these errors were encountered: