]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-139646: fix typo in `pickletools` error message (#139647)
authoryihong <zouzou0208@gmail.com>
Mon, 6 Oct 2025 10:52:45 +0000 (18:52 +0800)
committerGitHub <noreply@github.com>
Mon, 6 Oct 2025 10:52:45 +0000 (10:52 +0000)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Lib/pickletools.py
Lib/test/test_pickletools.py

index bcddfb722bd26dedec001455ff8c7a0f087b6db9..254b6c7fcc9dd230664c653713a3482799ee6097 100644 (file)
@@ -348,7 +348,7 @@ def read_stringnl(f, decode=True, stripquotes=True, *, encoding='latin-1'):
         for q in (b'"', b"'"):
             if data.startswith(q):
                 if not data.endswith(q):
-                    raise ValueError("strinq quote %r not found at both "
+                    raise ValueError("string quote %r not found at both "
                                      "ends of %r" % (q, data))
                 data = data[1:-1]
                 break
index a178d3353eecdf5776a68340924316508fab8ef5..cf990874621eae46e5b6585a4d96a48d4111ed11 100644 (file)
@@ -384,13 +384,13 @@ highest protocol among opcodes = 0
         self.check_dis_error(b'Sabc"\n.', '',
                              "no string quotes around b'abc\"'")
         self.check_dis_error(b"S'abc\n.", '',
-                             '''strinq quote b"'" not found at both ends of b"'abc"''')
+                             '''string quote b"'" not found at both ends of b"'abc"''')
         self.check_dis_error(b'S"abc\n.', '',
-                             r"""strinq quote b'"' not found at both ends of b'"abc'""")
+                             r"""string quote b'"' not found at both ends of b'"abc'""")
         self.check_dis_error(b"S'abc\"\n.", '',
-                             r"""strinq quote b"'" not found at both ends of b'\\'abc"'""")
+                             r"""string quote b"'" not found at both ends of b'\\'abc"'""")
         self.check_dis_error(b"S\"abc'\n.", '',
-                             r"""strinq quote b'"' not found at both ends of b'"abc\\''""")
+                             r"""string quote b'"' not found at both ends of b'"abc\\''""")
 
     def test_binstring(self):
         self.check_dis(b"T\x03\x00\x00\x00abc.", '''\