Skip to content

fix(post_stats): invalid escape sequence in punctuation-drop literal - #78

Merged
rivassec merged 1 commit into
mainfrom
fix-post-stats-escape
Sep 12, 2026
Merged

fix(post_stats): invalid escape sequence in punctuation-drop literal#78
rivassec merged 1 commit into
mainfrom
fix-post-stats-escape

Conversation

@rivassec

Copy link
Copy Markdown
Owner

plugins/post_stats/post_stats.py:46 uses \| in a normal string literal, an invalid escape sequence that emits a SyntaxWarning on every build and becomes a hard SyntaxError in a future Python. Surfaced in the Lighthouse workflow's build log.

Fix: \| -> \\| (explicit backslash + pipe). The drop set is byte-identical (still contains both backslash and pipe); a raw string wasn't used because the literal also contains escaped quotes.

Verified: 0 SyntaxWarnings on compile, drop set unchanged, 38 tests pass, build clean.

Line 46's \| is an invalid escape sequence (SyntaxWarning on every
build, hard SyntaxError in a future Python). Changed to \| so it is
explicitly backslash + pipe - identical drop set, warning gone. Not a
raw string because the literal also contains escaped quotes.
@rivassec
rivassec merged commit 604a29c into main Sep 12, 2026
18 checks passed
@rivassec
rivassec deleted the fix-post-stats-escape branch September 12, 2026 05:20
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.

1 participant