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 instance_attrs building error in Qt brain #1505

Merged
merged 8 commits into from
Apr 14, 2022

Conversation

jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented Apr 8, 2022

Description

Fix root cause of pylint-dev/pylint#6221. instance_attrs should have a list, not a bare Node:
https://github.com/PyCQA/astroid/blob/6578a7d04dc28a539402dc27ef50ac756bc9a6d7/astroid/nodes/scoped_nodes/scoped_nodes.py#L1135

Type of Changes

Type
🐛 Bug fix

Related Issue

Closes pylint-dev/pylint#6221

Supersedes pylint-dev/pylint#6235

@coveralls
Copy link

coveralls commented Apr 9, 2022

Pull Request Test Coverage Report for Build 2148474445

  • 3 of 11 (27.27%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 91.505%

Changes Missing Coverage Covered Lines Changed/Added Lines %
astroid/brain/brain_qt.py 2 10 20.0%
Totals Coverage Status
Change from base Build 2111457493: 0.02%
Covered Lines: 9091
Relevant Lines: 9935

💛 - Coveralls

@jacobtylerwalls
Copy link
Member Author

Adding the typing changes but not the functional change yields:

astroid/brain/brain_qt.py:37: error: Incompatible types in assignment (expression has type "NodeNG", target has type "List[NodeNG]")  [assignment]

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.12.0 milestone Apr 9, 2022
Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

Change itself looks good (and a pretty big oversight when this created). Some minor other comments.

.github/workflows/release-tests.yml Outdated Show resolved Hide resolved
astroid/brain/brain_qt.py Outdated Show resolved Hide resolved
astroid/brain/brain_qt.py Outdated Show resolved Hide resolved
astroid/nodes/scoped_nodes/mixin.py Outdated Show resolved Hide resolved
@DanielNoord
Copy link
Collaborator

@jacobtylerwalls Shall we merge this? CI failures are unrelated.

python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install Qt
run: |
sudo apt-get install build-essential libgl1-mesa-dev
Copy link
Contributor

Choose a reason for hiding this comment

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

As mentioned over in #1531 (comment):

I'm confused - why does "Install Qt" actually only do sudo apt-get install build-essential libgl1-mesa-dev? You are installing PyQt from binary wheels, so that 40s step can probably just be dropped entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Brain 🧠 Needs a brain tip Bug 🪳
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'str' object has no attribute 'parent'
5 participants