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

Fix false-positive used-before-assignment with := in Return node #4831

Merged
merged 1 commit into from Aug 12, 2021

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Aug 12, 2021

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

def foo() -> str:
    return bar if (bar := "") else ""

Closes #4828

@cdce8p cdce8p added False Positive 🦟 A message is emitted but nothing is wrong with the code Assignment expression Related to the walrus operator / assignment expression labels Aug 12, 2021
@cdce8p cdce8p added this to the 2.10.0 milestone Aug 12, 2021
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is clean !

@Pierre-Sassoulas Pierre-Sassoulas merged commit 0b9e449 into pylint-dev:main Aug 12, 2021
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1124775371

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.63%

Totals Coverage Status
Change from base Build 1122932210: 0.0%
Covered Lines: 13284
Relevant Lines: 14341

πŸ’› - Coveralls

@cdce8p cdce8p deleted the fix-used-before-assignment branch August 12, 2021 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Assignment expression Related to the walrus operator / assignment expression False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

used-before-assignment false positive with walrus operator
3 participants