gh-128016: Improved invalid escape sequence warning message (#128020)

This commit is contained in:
Umar Butler 2025-01-16 04:00:54 +11:00 committed by GitHub
parent 40a4d88a14
commit 8d8b854824
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 63 additions and 25 deletions

View file

@ -659,7 +659,8 @@ class CmdLineTest(unittest.TestCase):
stderr.splitlines()[-3:],
[ b' foo = """\\q"""',
b' ^^^^^^^^',
b'SyntaxError: invalid escape sequence \'\\q\''
b'SyntaxError: "\\q" is an invalid escape sequence. '
b'Did you mean "\\\\q"? A raw string is also an option.'
],
)