Skip to content

[pyflakes] getCommonAncestor can return None - #16833

Merged
srittau merged 1 commit into
python:mainfrom
Primeteumm:pyflakes-getcommonancestor-none
Nov 16, 2026
Merged

srittau merged 1 commit into
python:mainfrom
Primeteumm:pyflakes-getcommonancestor-none

Conversation

@Primeteumm

Copy link
Copy Markdown
Contributor

Checker.getCommonAncestor() returns None when stop is one of the nodes or a node has no parent: https://github.com/PyCQA/pyflakes/blob/5324946c5d8602697f5df6d98ad162920b3e5d61/pyflakes/checker.py#L900-L908

Agent used: Claude Code (Claude Opus 5.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

@srittau
srittau merged commit a00d16d into python:main Nov 16, 2026
74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants