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 when looking up an __init__ method #7744

Merged
merged 7 commits into from Nov 12, 2022

Conversation

mbyrnepr2
Copy link
Member

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
📜 Docs

Description

Fix a crash when a child class with an __init__ method inherits from a parent class with an __init__ class attribute.

Closes #7742

@coveralls
Copy link

coveralls commented Nov 10, 2022

Pull Request Test Coverage Report for Build 3452454525

  • 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.0005%) to 95.383%

Totals Coverage Status
Change from base Build 3452308194: 0.0005%
Covered Lines: 17291
Relevant Lines: 18128

💛 - Coveralls

@mbyrnepr2 mbyrnepr2 marked this pull request as ready for review November 10, 2022 15:12
@Pierre-Sassoulas Pierre-Sassoulas added the Crash 💥 A bug that makes pylint crash label Nov 10, 2022
@Pierre-Sassoulas
Copy link
Member

Merging upstream to fix primer following suggestion in #7738 (comment)

@mbyrnepr2 mbyrnepr2 closed this Nov 10, 2022
@mbyrnepr2 mbyrnepr2 reopened this Nov 10, 2022
@jacobtylerwalls jacobtylerwalls added the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Nov 11, 2022
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
DanielNoord
DanielNoord previously approved these changes Nov 12, 2022
@jacobtylerwalls
Copy link
Member

@mbyrnepr2 The current job on main needs to complete before we can start updating the PRs and rerunning jobs, FYI. :-)

@mbyrnepr2 mbyrnepr2 closed this Nov 12, 2022
@mbyrnepr2 mbyrnepr2 reopened this Nov 12, 2022
@jacobtylerwalls
Copy link
Member

I wonder if you also need to merge main.

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.15.6 milestone Nov 12, 2022
doc/whatsnew/fragments/7742.other Outdated Show resolved Hide resolved
pylint/checkers/classes/class_checker.py Show resolved Hide resolved
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.

👍

@mbyrnepr2 mbyrnepr2 merged commit e44eec6 into pylint-dev:main Nov 12, 2022
@mbyrnepr2 mbyrnepr2 deleted the 7742_crash_is_abstract branch November 12, 2022 21:23
@github-actions
Copy link
Contributor

🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉

This comment was generated for commit 162fa65

@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 Nov 16, 2022
Pierre-Sassoulas added a commit that referenced this pull request Nov 16, 2022
* Fix a crash when a child class with an ``__init__`` method inherits from a parent class with an ``__init__`` class attribute.

* `continue` if not a method.

* Update pylint/checkers/classes/class_checker.py

* Rename fragment

Closes #7742

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
Pierre-Sassoulas added a commit that referenced this pull request Nov 17, 2022
* Fix a crash when a child class with an ``__init__`` method inherits from a parent class with an ``__init__`` class attribute.

* `continue` if not a method.

* Update pylint/checkers/classes/class_checker.py

* Rename fragment

Closes #7742

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
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: ClassDef has no attribute is_abstract
5 participants