]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-135496: Fix f string exclamation mark error typo (GH-135495) (#135501)
authorGiGaGon <107241144+MeGaGiGaGon@users.noreply.github.com>
Sat, 14 Jun 2025 08:00:14 +0000 (01:00 -0700)
committerGitHub <noreply@github.com>
Sat, 14 Jun 2025 08:00:14 +0000 (11:00 +0300)
Lib/test/test_fstring.py
Misc/NEWS.d/next/Core and Builtins/2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst [new file with mode: 0644]
Parser/action_helpers.c

index 1ad16937b2b5ba167f0a6efe67e12a46e694bbe1..aad2a5fab4da092b665a1223061a02b143784e76 100644 (file)
@@ -1370,7 +1370,7 @@ x = (
         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 (file)
index 0000000..03b1f45
--- /dev/null
@@ -0,0 +1 @@
+Fix typo in the f-string conversion type error ("exclamanation" -> "exclamation").
index 8e841a9b150d2dd32f070c97fed8a51728ee09a0..99dd0976c6137da991b757b8062772232489568f 100644 (file)
@@ -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);