FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix autoupdate parsing without trailing newline by Niranjan-png · Pull Request #3784 · pre-commit/pre-commit · GitHub

Repository navigation

Fix autoupdate parsing without trailing newline - #3784

Closed
Niranjan-png wants to merge 6 commits into
pre-commit:mainfrom
Niranjan-png:fix/autoupdate-final-newline
Closed

Niranjan-png wants to merge 6 commits into
pre-commit:mainfrom
Niranjan-png:fix/autoupdate-final-newline

Conversation

Copy link
Copy Markdown

Fixes issue #3768 where autoupdate drops comments when the rev line is last and the file has no final newline. The regex REV_LINE_RE in autoupdate.py was updated to allow missing final newline by changing to . Added regression test covering LF, CRLF, missing final newline, and final newline cases.

asottile closed this Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL