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 issue #5969 for modified_iterating-list #5986

Merged

Conversation

orSolocate
Copy link
Contributor

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

Fix program crash for modified_iterating-list when the list being iterated through is a function call.
The bug was fixed so that it will not occur with dictionaries and sets as well.
A regression test was added too.

Closes #5969

… the list/dict/set being iterated through is a function call.
@coveralls
Copy link

coveralls commented Mar 26, 2022

Pull Request Test Coverage Report for Build 2044411171

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

Totals Coverage Status
Change from base Build 2044356620: 0.0004%
Covered Lines: 15339
Relevant Lines: 16286

πŸ’› - Coveralls

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

Thank you for the quick fix @orSolocate, we're going to release 2.13.1 shortly :)

@Pierre-Sassoulas
Copy link
Member

What do you think of the line that lost coverage as infer_val != utils.safe_infer(iter_obj): seems to be always false ? Can we remove this check following your change ?

@orSolocate
Copy link
Contributor Author

@Pierre-Sassoulas thanks for noticing that letting me know what the line was,
It shouldn't be removed. I added a new test case where this line is covered :D

@Pierre-Sassoulas Pierre-Sassoulas merged commit 5f33ca2 into pylint-dev:main Mar 26, 2022
@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
@orSolocate orSolocate deleted the orba/_modifid_interation_bugfix branch March 26, 2022 13:04
Pierre-Sassoulas added a commit that referenced this pull request Mar 26, 2022
When the list/dict/set being iterated through is a function call.

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
@Pierre-Sassoulas
Copy link
Member

This is released in 2.13.1 :) btw if you want to check the coverage details on coverall you need to login with your GitHub account: coveralls use it to not get rate limited for api calls.

@orSolocate
Copy link
Contributor Author

@Pierre-Sassoulas - thanks for merging man! and for for the coveralls tip, now I could see coverage details of my next uploads :)

@DanielNoord
Copy link
Collaborator

Just want to check in and say thanks @orSolocate for the quick turnaround here :)

@orSolocate
Copy link
Contributor Author

Thanks mate!

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.13 crashed with AttributeError: 'Call' object has no attribute 'name'
4 participants