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 crash when using enumerate in a ternary expression #7132

Merged
merged 1 commit into from Jul 5, 2022

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Closes #7131

@jacobtylerwalls jacobtylerwalls added the Crash πŸ’₯ A bug that makes pylint crash label Jul 5, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.14.5 milestone Jul 5, 2022
@jacobtylerwalls jacobtylerwalls added the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Jul 5, 2022
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2616547858

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

Totals Coverage Status
Change from base Build 2613850904: 0.001%
Covered Lines: 16705
Relevant Lines: 17518

πŸ’› - Coveralls

):
inferred = next(assign.iter.args[0].infer())
likely_call = assign.iter
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coincidentally, this could be done with a ternary πŸ˜„

But we never use those!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like Daniel wouldn't be a fan of this checker : #4871 πŸ˜‰

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2022

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 3170d32

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 merged commit 14b3363 into pylint-dev:main Jul 5, 2022
@jacobtylerwalls jacobtylerwalls deleted the ternary-crash branch July 5, 2022 14:49
@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 Jul 17, 2022
Pierre-Sassoulas pushed a commit to Pierre-Sassoulas/pylint that referenced this pull request Jul 17, 2022
Pierre-Sassoulas pushed a commit to Pierre-Sassoulas/pylint that referenced this pull request Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported Crash πŸ’₯ A bug that makes pylint crash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on if nested in for in.
4 participants