mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
gh-135496: Fix f string exclamation mark error typo (#135495)
This commit is contained in:
parent
56eabea056
commit
c2bb3f9843
3 changed files with 3 additions and 2 deletions
|
|
@ -1380,7 +1380,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,
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Fix typo in the f-string conversion type error ("exclamanation" -> "exclamation").
|
||||
|
|
@ -965,7 +965,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,
|
||||
"%c-string: conversion type must come right after the exclamanation mark",
|
||||
"%c-string: conversion type must come right after the exclamation mark",
|
||||
TOK_GET_STRING_PREFIX(p->tok)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue