rewrite-python icon indicating copy to clipboard operation
rewrite-python copied to clipboard

Concatenation with empty string is not parsed idempotently

Open greg-at-moderne opened this issue 1 year ago • 0 comments

Steps to reproduce

Using current main (da16633812da68d2b2d8d9054030fbbda733d5a2) the following test:

def test_concatenation_with_empty_string():
  # language=python
  rewrite_run(python('print("alef" "")'))

fails with:

Expected :'print("alef" "")'
Actual   :'print("alef" )'

AFAICT this is valid Python code.

greg-at-moderne avatar Jan 15 '25 09:01 greg-at-moderne