Closed isidentical closed 1 year ago
Verified on the PyPI dataset, full behavioral roundtrip 👍🏻 (there are still empty "" string constants in joined str parts we can fix, but not a big problem).
By the way @lysnikolaou, just to confirm, fstring-grammar-rebased-after-sprint
is the latest branch right? (I've been merging my code there but now that I was looking into the branch list, there are a couple different rebase branches 🤔)
Yup, fstring-grammar-rebased-after-sprint
was the latest one.
Verified on the PyPI dataset, full behavioral roundtrip 👍🏻 (there are still empty "" string constants in joined str parts we can fix, but not a big problem).
Where the empty strings are coming from?
Where the empty strings are coming from?
Example:
f"""\
{1}
"""
Tree difference:
Module(
body=[
Expr(
value=JoinedStr(
values=[
FormattedValue(
value=Constant(value=1),
conversion=-1),
Constant(value='\n')]))],
type_ignores=[])
Module(
body=[
Expr(
value=JoinedStr(
values=[
Constant(value=''), # <========================
FormattedValue(
value=Constant(value=1),
conversion=-1),
Constant(value='\n')]))],
This is hopefully the last fix we are going to need. Testing this (and the previous PRs) on top of PyPI now.