Skip to content

Add additional test cases used-before-assignment with try-except #5523

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 1 commit into from
Dec 15, 2021

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Dec 13, 2021

Description

Followup to #5500 and #5506

Add additional tests for used-before-assignment cases with try-except.
used-before-assignment should not be emitted for variables after the try-except block if

  • All ExceptHandlers define it
  • OR all ExceptHandlers, that don't raise an Exception or return, define it.

/CC: @jacobtylerwalls I created these while trying to isolate which case you mentioned #5500 (comment) isn't yet covered.

@cdce8p cdce8p added this to the 2.13.0 milestone Dec 13, 2021
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1574840847

  • 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 93.654%

Totals Coverage Status
Change from base Build 1573990002: 0.0%
Covered Lines: 14183
Relevant Lines: 15144

💛 - 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.

👍

@Pierre-Sassoulas Pierre-Sassoulas added Maintenance Discussion or action around maintaining pylint or the dev workflow Regression labels Dec 14, 2021
@Pierre-Sassoulas Pierre-Sassoulas merged commit fe547fb into pylint-dev:main Dec 15, 2021
@cdce8p cdce8p deleted the add_testcases-try-except branch December 15, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow Regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants