Closed lysnikolaou closed 3 years ago
Before this PR, there was an empty Constant node after the FormattedValue node even for a simple f-string like f'{a}':
Constant
FormattedValue
f'{a}'
>>> f = 'f"{a}"' >>> ast.dump(ast.parse(f)) "Module(body=[Expr(value=JoinedStr(values=[FormattedValue(value=Name(id='a', ctx=Load()), conversion=-1), Constant(value='')]))], type_ignores=[])"
With this PR:
>>> f = 'f"{a}"' >>> ast.dump(ast.parse(f)) "Module(body=[Expr(value=JoinedStr(values=[FormattedValue(value=Name(id='a', ctx=Load()), conversion=-1)]))], type_ignores=[])"
@lysnikolaou Does this need to wait until #149 is landed?
@pablogsal This can go already before #149, I think.
Yes!!
Before this PR, there was an empty
Constant
node after theFormattedValue
node even for a simple f-string likef'{a}'
:With this PR: