Skip to content

Fix invalid escape sequences in regex strings#299

Open
fgarau wants to merge 1 commit into
gregmalcolm:masterfrom
fgarau:fix-invalid-escape-sequences
Open

Fix invalid escape sequences in regex strings#299
fgarau wants to merge 1 commit into
gregmalcolm:masterfrom
fgarau:fix-invalid-escape-sequences

Conversation

@fgarau
Copy link
Copy Markdown

@fgarau fgarau commented Jun 1, 2026

Summary

  • Use raw strings (r"...") to fix SyntaxWarning for \d and \w in runner/sensei.py
  • Use raw string to fix SyntaxWarning for \[ and \d in libs/colorama/ansitowin32.py

These sequences currently fall back to literal backslash + character, but Python warns they will stop working in a future version.

Test plan

  • Run ./run.sh and confirm no SyntaxWarning lines appear for the affected files

Use raw strings (r"...") to avoid SyntaxWarning for \d, \w, and \[
which will become SyntaxErrors in future Python versions.
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