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

Add named-expr-without-context check #7763

Merged
merged 1 commit into from
Nov 14, 2022

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Nov 13, 2022

Description

Instead of emitting pointless-statement, this PR adds a new check named-expr-without-context for named expressions outside if, for, ...

(a := 42)  # named-expr-without-context

Closes #7760

@cdce8p cdce8p added the Enhancement ✨ Improvement to a component label Nov 13, 2022
@cdce8p cdce8p added this to the 2.16.0 milestone Nov 13, 2022
@cdce8p cdce8p force-pushed the named-expr-without-context branch from 3d1d516 to c56c594 Compare November 13, 2022 20:46
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3456869582

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.0005%) to 95.405%

Totals Coverage Status
Change from base Build 3455918345: 0.0005%
Covered Lines: 17335
Relevant Lines: 18170

💛 - Coveralls

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.

👌

@github-actions
Copy link
Contributor

🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉

This comment was generated for commit c56c594

@Pierre-Sassoulas Pierre-Sassoulas merged commit ff3531b into pylint-dev:main Nov 14, 2022
@cdce8p cdce8p deleted the named-expr-without-context branch November 14, 2022 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive pointless-statement for := operator
3 participants