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 a crash involving Uninferable args to namedtuple #1763

Merged
merged 3 commits into from Sep 4, 2022

Conversation

jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented Sep 4, 2022

Steps

  • For new features or bug fixes, add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

Description

Previously, the namedtuple brain assumed that the second argument to namedtuple() would be a container, but it could be Uninferable. In the bug report, it was a dict comprehension relying on a function argument.

Type of Changes

Type
🐛 Bug fix

Related Issue

Closes pylint-dev/pylint#7375

Regression in 9531e03.

@jacobtylerwalls jacobtylerwalls marked this pull request as draft September 4, 2022 17:54
@jacobtylerwalls jacobtylerwalls marked this pull request as ready for review September 4, 2022 18:11
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2989063289

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

Totals Coverage Status
Change from base Build 2953497406: 0.004%
Covered Lines: 9724
Relevant Lines: 10529

💛 - Coveralls

@jacobtylerwalls
Copy link
Member Author

Should we close the pylint issue or leave it open for a duplicative test?

@DanielNoord
Copy link
Collaborator

Should we close the pylint issue or leave it open for a duplicative test?

I have recently been closing them directly. If there is nothing in pylint that is affecting the outcome of a test why should we put a test for it there. Imo it unnecessarily prolongs the test suite.

@jacobtylerwalls jacobtylerwalls added the pylint-tested PRs that don't cause major regressions with pylint label Sep 4, 2022
@jacobtylerwalls jacobtylerwalls merged commit daa6a44 into pylint-dev:main Sep 4, 2022
@jacobtylerwalls jacobtylerwalls deleted the namedtuple-crash branch September 4, 2022 18:32
osmocom-gerrit pushed a commit to osmocom/pysim that referenced this pull request Sep 14, 2022
This reverts commit 12175d3.

The upstream has fixed the regression:

pylint-dev/pylint#7375

which was actually not in pylint itself but in its dependency:

pylint-dev/astroid#1763
https://github.com/PyCQA/astroid/releases/tag/v2.12.6

Change-Id: I1bf36e0c6db14a10ff4eab57bae238401dbd7fd0
Closes: OS#5668
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crash 💥 pylint-tested PRs that don't cause major regressions with pylint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: 'Uninferable' object is not iterable
4 participants