Skip to content

Fix a crash when _filter_stmts encounters an EmptyNode #1534

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

Merged
merged 3 commits into from
Apr 30, 2022

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