mirror of
https://github.com/python/cpython.git
synced 2025-10-07 23:51:16 +00:00
[3.6] bpo-23894: make lib2to3 recognize f-strings (GH-1733) (#1737)
Note: this doesn't unpack f-strings into the underlying JoinedStr AST.
Ideally we'd fully implement JoinedStr here but given its additional
complexity, I think this is worth bandaiding as is. This unblocks tools like
https://github.com/google/yapf to format 3.6 syntax using f-strings.
(cherry picked from commit 1b9530c536
)
This commit is contained in:
parent
d29feccec3
commit
e8412e684e
2 changed files with 7 additions and 1 deletions
|
@ -344,6 +344,7 @@ class TestStringLiterals(GrammarTest):
|
|||
"r'", 'r"', "R'", 'R"',
|
||||
"u'", 'u"', "U'", 'U"',
|
||||
"b'", 'b"', "B'", 'B"',
|
||||
"f'", 'f"', "F'", 'F"',
|
||||
"ur'", 'ur"', "Ur'", 'Ur"',
|
||||
"uR'", 'uR"', "UR'", 'UR"',
|
||||
"br'", 'br"', "Br'", 'Br"',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue