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 alarm for superfluous-parens #5803

Closed
kayhayen opened this issue Feb 14, 2022 · 0 comments · Fixed by #5964
Closed

False alarm for superfluous-parens #5803

kayhayen opened this issue Feb 14, 2022 · 0 comments · Fixed by #5964
Assignees
Labels
Bug 🪲 False Positive 🦟 A message is emitted but nothing is wrong with the code
Milestone

Comments

@kayhayen
Copy link

Bug description

Simple code gives false warning:

def f():
   return (base or dist_name) in ("Debian", "Ubuntu") 

As you can see, there are no braces around the return value, but I still get superfluous-parens Unnecessary parens after 'return' keyword

Configuration

Default config too.

Command used

pylint test.py

Pylint output

nuitka/utils/Utils.py:107 C0325 superfluous-parens  Unnecessary parens after 'return' keyword

Expected behavior

Should detect the parens usage properly.

Pylint version

pylint 2.12.1
astroid 2.9.0
Python 3.9.2 (default, Feb 28 2021, 17:03:44)

OS / Environment

Debian Bullseye, but pip installed pylint

Additional dependencies

Nothing

@kayhayen kayhayen added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Feb 14, 2022
@jacobtylerwalls jacobtylerwalls added Bug 🪲 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 Mar 15, 2022
@jacobtylerwalls jacobtylerwalls self-assigned this Mar 15, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.13.2 milestone Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 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