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

superfluous-parens triggered when it should not #4962

Closed
aleb opened this issue Sep 4, 2021 · 2 comments
Closed

superfluous-parens triggered when it should not #4962

aleb opened this issue Sep 4, 2021 · 2 comments
Labels
Milestone

Comments

@aleb
Copy link

aleb commented Sep 4, 2021

Bug description

def _(a):
    return a

for a, b in ((3, _(4)), (1, _(2))):
    print(a, b)

Configuration

No response

Command used

$ pylint ~/a.py

Pylint output

************* Module a
/home/aleb/a.py:4:0: C0325: Unnecessary parens after 'in' keyword (superfluous-parens)

Expected behavior

I'd expect superfluous-parens not to be printed since the parenthesis are required.

Pylint version

pylint 2.10.2
astroid 2.7.3
Python 3.8.8 (default, Nov 10 2011, 15:00:00) 
[GCC 10.2.0]

OS / Environment

No response

Additional dependencies

No response

@aleb aleb added Bug 🪲 Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Sep 4, 2021
@Pierre-Sassoulas Pierre-Sassoulas removed the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Sep 5, 2021
@Pierre-Sassoulas
Copy link
Member

This is supposed to be fixed in the main branch, and will be available in 2.11.0. Can you confirm by installing the latest pylint with : pip install git+git://github.com/PyCQA/pylint.git@main#egg=pylint -U, please ?

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.11.0 milestone Sep 5, 2021
@aleb
Copy link
Author

aleb commented Sep 5, 2021

Thanks! I believe you. We'll ignore this warning for now.

@aleb aleb closed this as completed Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants