We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm not sure how to handle this one, so I did not submit a PR yet.
Source (from Python 3.7's dataclasses.py): f"{f.name}={{self.{f.name}!r}}"
f"{f.name}={{self.{f.name}!r}}"
Parsed as:
JoinedStr( values=[ FormattedValue(value=Attribute(value=Name(id='f'), attr='name'), conversion=-1, format_spec=None), Str(s='={self.'), FormattedValue(value=Attribute(value=Name(id='f'), attr='name'), conversion=-1, format_spec=None), Str(s='!r}')]),
which becomes a syntax error after rtrip: f'{f.name}={self.{f.name}!r}'
f'{f.name}={self.{f.name}!r}'
File "<fstring>", line 1 (self.{f.name}) ^ SyntaxError: invalid syntax
The text was updated successfully, but these errors were encountered:
Fix code generation with escaped braces in f-strings (#125)
a3c9e28
Fixes #124
No branches or pull requests
I'm not sure how to handle this one, so I did not submit a PR yet.
Source (from Python 3.7's dataclasses.py):
f"{f.name}={{self.{f.name}!r}}"
Parsed as:
which becomes a syntax error after rtrip:
f'{f.name}={self.{f.name}!r}'
The text was updated successfully, but these errors were encountered: