10000 [3.13] gh-135496: Fix f string exclamation mark error typo (GH-135495… · python/cpython@a43cf10 · GitHub
[go: up one dir, main page]

Skip to content

Commit a43cf10

Browse files
authored
[3.13] gh-135496: Fix f string exclamation mark error typo (GH-135495) (#135501)
1 parent e753a7c commit a43cf10

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Lib/test/test_fstring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ def test_conversions(self):
13701370
for conv in ' s', ' s ':
13711371
self.assertAllRaise(SyntaxError,
13721372
"f-string: conversion type must come right after the"
1373-
" exclamanation mark",
1373+
" exclamation mark",
13741374
["f'{3!" + conv + "}'"])
13751375

13761376
self.assertAllRaise(SyntaxError,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix typo in the f-string conversion type error ("exclamanation" -> "exclamation").

Parser/action_helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ _PyPegen_check_fstring_conversion(Parser *p, Token* conv_token, expr_ty conv)
955955
if (conv_token->lineno != conv->lineno || conv_token->end_col_offset != conv->col_offset) {
956956
return RAISE_SYNTAX_ERROR_KNOWN_RANGE(
957957
conv_token, conv,
958-
"f-string: conversion type must come right after the exclamanation mark"
958+
"f-string: conversion type must come right after the exclamation mark"
959959
);
960960
}
961961
return result_token_with_metadata(p, conv, conv_token->metadata);

0 commit comments

Comments
 (0)
0