Skip to content
New issue

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

Handle string escaping for SimpleString expression in FormattedString #219

Open
jimmylai opened this issue Jan 22, 2020 · 1 comment
Open
Labels
parsing Converting source code into CST nodes

Comments

@jimmylai
Copy link
Contributor

jimmylai commented Jan 22, 2020

f"{a or ""}" this is invalid syntax but LibCST handles it and renders the invalid code.

We can either:

  • automatically escape the string quotes in the inner expression.
  • raise exception on code generation.
@DragonMinded
Copy link
Contributor

We should raise an exception. We do not do any mangling of constructor arguments on any nodes elsewhere and shouldn't attempt to do so here.

@zsol zsol added the parsing Converting source code into CST nodes label Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parsing Converting source code into CST nodes
Projects
None yet
Development

No branches or pull requests

3 participants