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 positive 'nonexistent-operator' for repeated '-' (with parens) #5769

Closed
skirpichev opened this issue Feb 4, 2022 · 0 comments · Fixed by #6008
Closed

False positive 'nonexistent-operator' for repeated '-' (with parens) #5769

skirpichev opened this issue Feb 4, 2022 · 0 comments · Fixed by #6008
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code

Comments

@skirpichev
Copy link
Contributor

skirpichev commented Feb 4, 2022

Bug description

$ cat -n a.py 
     1  a = 1
     2  b = -(-a)

Configuration

none

Command used

pylint -d all -e nonexistent-operator a.py

Pylint output

************* Module a
a.py:2:4: E0107: Use of the non-existent -- operator (nonexistent-operator)

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

Expected behavior

No error.

Pylint version

pylint 2.12.2
astroid 2.9.3
Python 3.10.0+ (heads/3.10:045f205ba4, Nov  8 2021, 05:21:54) [GCC 10.2.1 20210110]

OS / Environment

No response

Additional dependencies

No response

@skirpichev skirpichev added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Feb 4, 2022
@DanielNoord DanielNoord added False Positive 🦟 A message is emitted but nothing is wrong with the code and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Feb 4, 2022
skirpichev added a commit to skirpichev/diofant that referenced this issue Feb 8, 2022
DanielNoord pushed a commit that referenced this issue Mar 29, 2022
… or parens) (#6008)

Closes #5769

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Pierre-Sassoulas added a commit that referenced this issue Mar 29, 2022
… or parens) (#6008)

Closes #5769

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants