LibCST
LibCST copied to clipboard
Handle string escaping for SimpleString expression in FormattedString
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.
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.