Skip to content

Fix a crash in unnecessary-list-index-lookup when incorrectly using enumerate()#6604

Merged
jacobtylerwalls merged 1 commit into
pylint-dev:mainfrom
jacobtylerwalls:crash-enumerate
May 13, 2022
Merged

Fix a crash in unnecessary-list-index-lookup when incorrectly using enumerate()#6604
jacobtylerwalls merged 1 commit into
pylint-dev:mainfrom
jacobtylerwalls:crash-enumerate

Conversation

@jacobtylerwalls
Copy link
Copy Markdown
Member

Type of Changes

Type
🐛 Bug fix

Description

Closes #6603

@jacobtylerwalls jacobtylerwalls added Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer Crash 💥 A bug that makes pylint crash labels May 13, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.13.9 milestone May 13, 2022
@jacobtylerwalls jacobtylerwalls changed the title Fix a crash in unnecessary-list-index-lookup when incorrectly using… Fix a crash in unnecessary-list-index-lookup when incorrectly using enumerate() May 13, 2022
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 2319539682

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

Totals Coverage Status
Change from base Build 2318658517: 0.0%
Covered Lines: 16041
Relevant Lines: 16824

💛 - Coveralls

Copy link
Copy Markdown
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.

LGTM thank you !

@jacobtylerwalls jacobtylerwalls merged commit 5fee33f into pylint-dev:main May 13, 2022
@jacobtylerwalls jacobtylerwalls deleted the crash-enumerate branch May 13, 2022 13:40
@Pierre-Sassoulas
Copy link
Copy Markdown
Member

Pierre-Sassoulas commented May 13, 2022

I got a 80 lines function conflicting to add here during the cherry-pick on 2.13. I did not understand precisely why... I wonder if it's also going to add "feature" to the 2.13 branch. Also 3 check in the functional test for unnecessary index lookup are not passing, probably because of other bug fixes that are only in 2.14. Do you think it's worth it to fix the cherry-pick @jacobtylerwalls ?

@Pierre-Sassoulas
Copy link
Copy Markdown
Member

It's possible that the crash was introduced in 2.14 in the conflicting function.

@jacobtylerwalls
Copy link
Copy Markdown
Member Author

Oops, sorry, you're right, this entire check was a new feature in 2.14!

@jacobtylerwalls jacobtylerwalls removed the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label May 13, 2022
@jacobtylerwalls jacobtylerwalls modified the milestones: 2.13.9, 2.14.0 May 13, 2022
@jacobtylerwalls
Copy link
Copy Markdown
Member Author

I'll remove the release note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Crash 💥 A bug that makes pylint crash Unreleased

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash when parsing empty enumerate() call

3 participants