There was an error while loading. Please reload this page.
1 parent e753a7c commit a43cf10Copy full SHA for a43cf10
3 files changed
Lib/test/test_fstring.py
@@ -1370,7 +1370,7 @@ def test_conversions(self):
1370
for conv in ' s', ' s ':
1371
self.assertAllRaise(SyntaxError,
1372
"f-string: conversion type must come right after the"
1373
- " exclamanation mark",
+ " exclamation mark",
1374
["f'{3!" + conv + "}'"])
1375
1376
Misc/NEWS.d/next/Core and Builtins/2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst
@@ -0,0 +1 @@
1
+Fix typo in the f-string conversion type error ("exclamanation" -> "exclamation").
Parser/action_helpers.c
@@ -955,7 +955,7 @@ _PyPegen_check_fstring_conversion(Parser *p, Token* conv_token, expr_ty conv)
955
if (conv_token->lineno != conv->lineno || conv_token->end_col_offset != conv->col_offset) {
956
return RAISE_SYNTAX_ERROR_KNOWN_RANGE(
957
conv_token, conv,
958
- "f-string: conversion type must come right after the exclamanation mark"
+ "f-string: conversion type must come right after the exclamation mark"
959
);
960
}
961
return result_token_with_metadata(p, conv, conv_token->metadata);
0 commit comments