https://github.com/python/cpython/commit/a43cf1074a8b53abc2c44dec0db42d7dbf6ff93a
commit: a43cf1074a8b53abc2c44dec0db42d7dbf6ff93a
branch: 3.13
author: GiGaGon <[email protected]>
committer: hugovk <[email protected]>
date: 2025-06-14T11:00:14+03:00
summary:
[3.13] gh-135496: Fix f string exclamation mark error typo (GH-135495) (#135501)
files:
A Misc/NEWS.d/next/Core and
Builtins/2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst
M Lib/test/test_fstring.py
M Parser/action_helpers.c
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py
index 1ad16937b2b5ba..aad2a5fab4da09 100644
--- a/Lib/test/test_fstring.py
+++ b/Lib/test/test_fstring.py
@@ -1370,7 +1370,7 @@ def test_conversions(self):
for conv in ' s', ' s ':
self.assertAllRaise(SyntaxError,
"f-string: conversion type must come right
after the"
- " exclamanation mark",
+ " exclamation mark",
["f'{3!" + conv + "}'"])
self.assertAllRaise(SyntaxError,
diff --git a/Misc/NEWS.d/next/Core and
Builtins/2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst b/Misc/NEWS.d/next/Core
and Builtins/2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst
new file mode 100644
index 00000000000000..03b1f4590c5846
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and
Builtins/2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst
@@ -0,0 +1 @@
+Fix typo in the f-string conversion type error ("exclamanation" ->
"exclamation").
diff --git a/Parser/action_helpers.c b/Parser/action_helpers.c
index 8e841a9b150d2d..99dd0976c6137d 100644
--- a/Parser/action_helpers.c
+++ b/Parser/action_helpers.c
@@ -955,7 +955,7 @@ _PyPegen_check_fstring_conversion(Parser *p, Token*
conv_token, expr_ty conv)
if (conv_token->lineno != conv->lineno || conv_token->end_col_offset !=
conv->col_offset) {
return RAISE_SYNTAX_ERROR_KNOWN_RANGE(
conv_token, conv,
- "f-string: conversion type must come right after the exclamanation
mark"
+ "f-string: conversion type must come right after the exclamation
mark"
);
}
return result_token_with_metadata(p, conv, conv_token->metadata);
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]