[Python-checkins] Fix invalid escape sequence: use raw string. (GH-6225)

Miss Islington (bot) webhook-mailer at python.org
Sat Mar 24 23:23:06 EDT 2018

commit: 5729b9c0e9833ec8387d1bdaef619a2e66060a28
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-03-24T20:23:00-07:00

Fix invalid escape sequence: use raw string. (GH-6225)

(cherry picked from commit c42e7aa67ce72a6c4c6cdfe3b0929ca07556d444)

Co-authored-by: Eric V. Smith <ericvsmith at users.noreply.github.com>

M Lib/test/test_dataclasses.py

diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py
index 8aff8ae140a5..75e3cffc4a5e 100755
--- a/Lib/test/test_dataclasses.py
+++ b/Lib/test/test_dataclasses.py
@@ -2667,7 +2667,7 @@ class C:
         # There was a bug where a variable in a slot was assumed
         #  to also have a default value (of type types.MemberDescriptorType).
         with self.assertRaisesRegex(TypeError,
-                                    "__init__\(\) missing 1 required positional argument: 'x'"):
+                                    r"__init__\(\) missing 1 required positional argument: 'x'"):
         # We can create an instance, and assign to x.

More information about the Python-checkins mailing list