PyCQA / baron

IDE allow you to refactor code, Baron allows you to write refactoring code.
http://baron.pycqa.org
GNU Lesser General Public License v3.0
289 stars 50 forks source link

Mishandling of print function #172

Open shindavid opened 2 years ago

shindavid commented 2 years ago

The following code...

import redbaron
rb = redbaron.RedBaron('func = print if True else print')
print(rb.dumps())

...produces the following output:

func = printif True else print

Note that the space between the print and the if has been removed.

This bug does not occur if the the word print is replaced with foo.