Closed browniebroke closed 5 years ago
This issue occurs in general when there are two conversions on a single line. Working on a fix.
Ah yes, this reproduces the problem too:
'{}'.format(3) + '{}'.format(5)
Fixed in v. 0.25 - now on PyPI. pip install --upgrade flynt
for the newest version :)
Amazing, thanks! Will give it a go.
We use openpyxl to generate some Excel reports and it has an unsual syntax, but completely logical in Excel land, that lets you select a subset of a sheet in a workbook with something like
sheet['A1': 'C1']
.We use this syntax in a loop, where we use the index of the loop to format the string with number in it. Essentially, we do something like this:
The result we are getting when running Flynt is that the last line is duplicated:
I'll see if I can isolate a use case that doesn't involve openpyxl, but in the meantime I thought I report it.
Thanks for this library!