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 nonlocal in try block regression for used-before-assignment #5966

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Fixes regression in 2.13 where names in try blocks were checked for the first time for used-before-assignment, but we needed to allow for nonlocals.

Closes #5965

Question: does this need a changelog in what's new/2.13? Or is this part of the plan to reduce redundancy in the changelogs?

@Pierre-Sassoulas
Copy link
Member

Question: does this need a changelog in what's new/2.13? Or is this part of the plan to reduce redundancy in the changelogs?

Yes, I'm wondering where we put the changelog when we backport vs when we don't backport. Probably a discussion for #5728

@DanielNoord
Copy link
Collaborator

Probably should go in 2.13. Anything that is accessible for the end-user from a 2.13.x version should be in there I guess?

@DanielNoord DanielNoord added this to the 2.13.1 milestone Mar 25, 2022
@Pierre-Sassoulas Pierre-Sassoulas 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 Mar 25, 2022
@Pierre-Sassoulas
Copy link
Member

Right. I need something to copy paste for the release so the Changelog for 2.13.1 is here for that, and the whatsnew for 2.13 is where everything is together for user. It does not help with the duplication problem later, but it's working.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2037611516

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

Totals Coverage Status
Change from base Build 2036902764: 0.0007%
Covered Lines: 15291
Relevant Lines: 16238

πŸ’› - Coveralls

@Pierre-Sassoulas Pierre-Sassoulas merged commit 025200c into pylint-dev:main Mar 25, 2022
@jacobtylerwalls jacobtylerwalls deleted the nonlocal-in-try branch March 25, 2022 12:05
@Pierre-Sassoulas Pierre-Sassoulas removed the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 nonlocal
4 participants