mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-26 21:09:22 +08:00
Properly check for invalid conversion character with f-string debugging syntax (#156)
This commit is contained in:
@@ -357,3 +357,7 @@ if sys.version_info[:2] >= (3, 8):
|
||||
'(None := 1)',
|
||||
'(__debug__ := 1)',
|
||||
]
|
||||
# f-string debugging syntax with invalid conversion character
|
||||
FAILING_EXAMPLES += [
|
||||
"f'{1=!b}'",
|
||||
]
|
||||
|
||||
@@ -79,6 +79,7 @@ def test_valid(code, grammar):
|
||||
|
||||
# invalid conversion characters
|
||||
'f"{1!{a}}"',
|
||||
'f"{1=!{a}}"',
|
||||
'f"{!{a}}"',
|
||||
|
||||
# The curly braces must contain an expression
|
||||
|
||||
Reference in New Issue
Block a user