[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:
Łukasz Langa 2017-05-22 22:23:29 -07:00 committed by GitHub
parent d29feccec3
commit e8412e684e
2 changed files with 7 additions and 1 deletions

View file

@ -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"',