mirror of
https://github.com/davidhalter/parso.git
synced 2026-11-07 10:45:55 +08:00
Allow some unparenthesized syntactic structures in f-string expression part (#159)
Resolves #157, #158
This commit is contained in:
1 parent
034a9e8944
commit
b08b61b578
7 files changed
+14
-5
No files matched your search
@@ -60,6 +60,13 @@ def grammar():
|
||||
|
||||
# a line continuation inside of an format spec
|
||||
'f"{123:.2\\\nf}"',
|
||||
|
||||
# some unparenthesized syntactic structures
|
||||
'f"{*x,}"',
|
||||
'f"{*x, *y}"',
|
||||
'f"{x, *y}"',
|
||||
'f"{*x, y}"',
|
||||
'f"{x for x in [1]}"',
|
||||
]
|
||||
)
|
||||
def test_valid(code, grammar):
|
||||
|
||||
Reference in new issue
Block a user