Skip to content

Commit 36a6c2c

Browse files
authored
gh-139646: fix typo in pickletools error message (#139647)
Signed-off-by: yihong0618 <[email protected]>
1 parent 6f3dae0 commit 36a6c2c

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
@@ -384,13 +384,13 @@ def test_string_without_quotes(self):
384384
self.check_dis_error(b'Sabc"\n.', '',
385385
"no string quotes around b'abc\"'")
386386
self.check_dis_error(b"S'abc\n.", '',
387-
'''strinq quote b"'" not found at both ends of b"'abc"''')
387+
'''string quote b"'" not found at both ends of b"'abc"''')
388388
self.check_dis_error(b'S"abc\n.', '',
389-
r"""strinq quote b'"' not found at both ends of b'"abc'""")
389+
r"""string quote b'"' not found at both ends of b'"abc'""")
390390
self.check_dis_error(b"S'abc\"\n.", '',
391-
r"""strinq quote b"'" not found at both ends of b'\\'abc"'""")
391+
r"""string quote b"'" not found at both ends of b'\\'abc"'""")
392392
self.check_dis_error(b"S\"abc'\n.", '',
393-
r"""strinq quote b'"' not found at both ends of b'"abc\\''""")
393+
r"""string quote b'"' not found at both ends of b'"abc\\''""")
394394

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

0 commit comments

Comments
 (0)