From 25279631526c60ee575a99dc16ae4334813cf61f Mon Sep 17 00:00:00 2001 From: GiGaGon <107241144+MeGaGiGaGon@users.noreply.github.com> Date: Fri, 13 Jun 2025 23:46:34 -0700 Subject: [PATCH 1/3] Update test_fstring.py --- Lib/test/test_fstring.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, From 2e14cfedcbdf4699534d1ffca369c8531989ffb8 Mon Sep 17 00:00:00 2001 From: GiGaGon <107241144+MeGaGiGaGon@users.noreply.github.com> Date: Fri, 13 Jun 2025 23:47:26 -0700 Subject: [PATCH 2/3] Update action_helpers.c --- Parser/action_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); From 8dcf943d8f1d19a480acfa8c97f5d1d01f58b377 Mon Sep 17 00:00:00 2001 From: GiGaGon <107241144+MeGaGiGaGon@users.noreply.github.com> Date: Fri, 13 Jun 2025 23:53:04 -0700 Subject: [PATCH 3/3] Create 2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst --- .../2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst 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").