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 negative superfluous-parens when around two conditional and an and #10084

Open
bebound opened this issue Nov 18, 2024 · 0 comments
Open
Labels
False Negative 🦋 No message is emitted but something is wrong with the code Needs PR This issue is accepted, sufficiently specified and now needs an implementation

Comments

@bebound
Copy link

bebound commented Nov 18, 2024

Bug description

This code should raise C0325:

a = 1

if (1 == 1 and 2 == 1):
    pass

if (a is None and a is not None):
    pass

Command used

pylint --disable=all --enable=C0325 kk.py

Pylint output

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 0.00/10, +10.00)

Expected behavior

Raise C0325

Pylint version

pylint 3.3.1
astroid 3.3.5
Python 3.12.7 (tags/v3.12.7:0b05ead, Oct  1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)]
@bebound bebound added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Nov 18, 2024
@Pierre-Sassoulas Pierre-Sassoulas added False Negative 🦋 No message is emitted but something is wrong with the code Needs PR This issue is accepted, sufficiently specified and now needs an implementation and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Nov 19, 2024
@Pierre-Sassoulas Pierre-Sassoulas changed the title superfluous-parens / C0325 miss alarm False negative superfluous-parens when around two conditional and an and Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Negative 🦋 No message is emitted but something is wrong with the code Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Projects
None yet
Development

No branches or pull requests

2 participants