Skip to content

Commit 94b26f0

Browse files
[3.13] pythongh-139646: fix typo in pickletools error message (pythonGH-139647) (pythonGH-139650)
(cherry picked from commit 36a6c2c) Signed-off-by: yihong0618 <[email protected]> Co-authored-by: yihong <[email protected]>
1 parent ccf2f37 commit 94b26f0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Lib/pickletools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def read_stringnl(f, decode=True, stripquotes=True, *, encoding='latin-1'):
348348
for q in (b'"', b"'"):
349349
if data.startswith(q):
350350
if not data.endswith(q):
351-
raise ValueError("strinq quote %r not found at both "
351+
raise ValueError("string quote %r not found at both "
352352
"ends of %r" % (q, data))
353353
data = data[1:-1]
354354
break

Lib/test/test_pickletools.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,13 +394,13 @@ def test_string_without_quotes(self):
394394
self.check_dis_error(b'Sabc"\n.', '',
395395
"no string quotes around b'abc\"'")
396396
self.check_dis_error(b"S'abc\n.", '',
397-
'''strinq quote b"'" not found at both ends of b"'abc"''')
397+
'''string quote b"'" not found at both ends of b"'abc"''')
398398
self.check_dis_error(b'S"abc\n.', '',
399-
r"""strinq quote b'"' not found at both ends of b'"abc'""")
399+
r"""string quote b'"' not found at both ends of b'"abc'""")
400400
self.check_dis_error(b"S'abc\"\n.", '',
401-
r"""strinq quote b"'" not found at both ends of b'\\'abc"'""")
401+
r"""string quote b"'" not found at both ends of b'\\'abc"'""")
402402
self.check_dis_error(b"S\"abc'\n.", '',
403-
r"""strinq quote b'"' not found at both ends of b'"abc\\''""")
403+
r"""string quote b'"' not found at both ends of b'"abc\\''""")
404404

405405
def test_binstring(self):
406406
self.check_dis(b"T\x03\x00\x00\x00abc.", '''\

0 commit comments

Comments
 (0)