Skip to content

Prevent used-before-assignment for names only defined under except if the else returns #6791

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

Merged
merged 2 commits into from
Jun 3, 2022

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
🐛 Bug fix

Description

Closes #6790

@jacobtylerwalls jacobtylerwalls added Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer False Positive 🦟 A message is emitted but nothing is wrong with the code labels Jun 2, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.14.1 milestone Jun 2, 2022
@coveralls
Copy link

coveralls commented Jun 2, 2022

Pull Request Test Coverage Report for Build 2428280704

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

Totals Coverage Status
Change from base Build 2422297694: 0.0008%
Covered Lines: 16234
Relevant Lines: 16996

💛 - Coveralls

@jacobtylerwalls jacobtylerwalls added the C: used-before-assignment Issues related to 'used-before-assignment' check label Jun 2, 2022
@github-actions

This comment has been minimized.

@jacobtylerwalls jacobtylerwalls marked this pull request as draft June 2, 2022 12:35
@jacobtylerwalls
Copy link
Member Author

Identified a false negative -- looking into a solution.

@jacobtylerwalls jacobtylerwalls marked this pull request as ready for review June 2, 2022 12:42
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2022

🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉This comment was generated for commit b0f2018

@DanielNoord DanielNoord merged commit 76dcd07 into pylint-dev:main Jun 3, 2022
@jacobtylerwalls jacobtylerwalls deleted the else-returns branch June 3, 2022 11:11
@Pierre-Sassoulas Pierre-Sassoulas added Backported and removed Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Jun 5, 2022
Pierre-Sassoulas pushed a commit that referenced this pull request Jun 5, 2022
Pierre-Sassoulas pushed a commit that referenced this pull request Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported C: used-before-assignment Issues related to 'used-before-assignment' check 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.

False positive used-before-assignment with try/else
4 participants