Whole file

asottile/tokenize-rt

The author described this change as fix UNIMPORTANT_WS offsets for implicit continuation. It counts as a record because the check below fails on the code as it stood at 92fa4712e and passes on 00b1b27f1, with nothing else changed between the two runs.

Fix saved2021-10-21
Sharing licenceMIT · LICENSE
Change size+1 3

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

fix UNIMPORTANT_WS offsets for implicit continuation

The change

8787 end_offset = 0
8888 last_line += 1
8989 if newtok:
90- tokens.append(
91- Token(UNIMPORTANT_WS, newtok, last_line, end_offset),
92- )
90+ tokens.append(Token(UNIMPORTANT_WS, newtok, sline, 0))
9391
9492 elif scol > last_col:
9593 tokens.append(

The check that tells the two apart

failpass·tests/tokenize_rt_test.py::test_src_to_tokens_implicit_continue

Check file tests/tokenize_rt_test.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 it92fa4712eea44db57b3b3543d0fde8bbe3bf0315
Broken version dated2021-10-21
Moduletokenize_rt
Units changedsrc_to_tokens
Fingerprint773a25fe5574c2b7
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 asottile/tokenize-rt