Skip to content

Fix normalizer crash on comments after line continuations - #244

Closed
be-student wants to merge 1 commit into
davidhalter:masterfrom
be-student:codex/219-normalizer-continuation
Closed

be-student wants to merge 1 commit into
davidhalter:masterfrom
be-student:codex/219-normalizer-continuation

Conversation

@be-student

Copy link
Copy Markdown

A comment after a line continuation can make the PEP8 normalizer walk past the root of its saved indentation stack. Stop at that root when the current continuation node is newer than the saved stack.

Closes #219. Adds 27 regression variants covering line endings, comments, and preceding statements/suites, while checking that the missing-final-newline diagnostic is preserved. Includes the required changelog and author entries.

Validation: all 27 variants failed before the fix; the full suite now passes (2,016 tests). Flake8, Zuban (49 source files), and git diff --check pass. Tested locally on Python 3.12/macOS; the remaining CI interpreter matrix was not run locally.

@davidhalter

Copy link
Copy Markdown
Owner

Is this fully LLM? How did you even discover this? Why do you want to fix this?

@be-student be-student closed this Sep 12, 2026
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.

Uncaught exception in get_normalizer_issues

2 participants