[3.13] gh-135496: Fix f string exclamation mark error typo (GH-135495) (#135501)
Some checks are pending
Tests / Windows MSI (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run

This commit is contained in:
GiGaGon 2025-06-14 01:00:14 -07:00 committed by GitHub
parent e753a7c5f0
commit a43cf1074a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View 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,

View file

@ -0,0 +1 @@
Fix typo in the f-string conversion type error ("exclamanation" -> "exclamation").

View 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);