Whole file

berkerpeksag/astor

The author described this change as Fix trailing newlines in f-strings (#103). It counts as a record because the check below fails on the code as it stood at b47718fa0 and passes on 3c4efdb93, with nothing else changed between the two runs.

Fix saved2018-05-07
Sharing licenceBSD-3-Clause · LICENSE
Change size+3 0

What the code was meant to do, written into the code itself as a save note

Fix trailing newlines in f-strings (#103)

The change

580580
581581 index = len(result)
582582 recurse(node)
583+
584+ # Flush trailing newlines (so that they are part of mystr)
585+ self.write('')
583586 mystr = ''.join(result[index:])
584587 del result[index:]
585588 self.colinfo = res_index, str_index # Put it back like we found it

The check that tells the two apart

failpass·tests/test_code_gen.py::CodegenTestCase::test_fstring_trailing_newline

Check file tests/test_code_gen.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before itb47718fa095e456c064d3d222f296fccfe36266b
Broken version dated2018-04-06
Moduleastor.code_gen
Units changedSourceGenerator
Fingerprintb187e8093b5d1c76
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in berkerpeksag/astor