Skip to content

Fix a crash when _filter_stmts encounters an EmptyNode#1534

Merged
jacobtylerwalls merged 3 commits intopylint-dev:mainfrom
jacobtylerwalls:empty-node-crash
Apr 30, 2022
Merged

Fix a crash when _filter_stmts encounters an EmptyNode#1534
jacobtylerwalls merged 3 commits intopylint-dev:mainfrom
jacobtylerwalls:empty-node-crash

Conversation

@jacobtylerwalls
Copy link
Member

Description

An assertion was added in 864d2f3 "to be removed later". EmptyNode was failing the condition, see also related issue pylint-dev/pylint#2535. This PR removes the assertion and short-circuits.

Type of Changes

Type
🐛 Bug fix

Related Issue

Closes pylint-dev/pylint#6438. Added a regression test without Qt.

@jacobtylerwalls jacobtylerwalls added Bug 🪳 needs-backport pylint-tested PRs that don't cause major regressions with pylint labels Apr 28, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.11.4 milestone Apr 28, 2022
@coveralls
Copy link

coveralls commented Apr 28, 2022

Pull Request Test Coverage Report for Build 2239616454

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.03%) to 91.612%

Files with Coverage Reduction New Missed Lines %
astroid/filter_statements.py 1 95.7%
astroid/brain/brain_dataclasses.py 2 91.32%
Totals Coverage Status
Change from base Build 2234990462: 0.03%
Covered Lines: 9131
Relevant Lines: 9967

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug 🪳 pylint-tested PRs that don't cause major regressions with pylint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash when linting LeoQt

4 participants