Skip to content

Fix a crash when looking up an __init__ method#7744

Merged
mbyrnepr2 merged 7 commits intopylint-dev:mainfrom
mbyrnepr2:7742_crash_is_abstract
Nov 12, 2022
Merged

Fix a crash when looking up an __init__ method#7744
mbyrnepr2 merged 7 commits intopylint-dev:mainfrom
mbyrnepr2:7742_crash_is_abstract

Conversation

@mbyrnepr2
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Comment thread pylint/checkers/classes/class_checker.py Outdated
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
Copy Markdown
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
Copy Markdown
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
Comment thread doc/whatsnew/fragments/7742.other
Comment thread pylint/checkers/classes/class_checker.py
Copy link
Copy Markdown
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
Copy Markdown
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