Modernize the rest of chunk and opcode generators and differ base.
Review Request #14503 — Created July 11, 2025 and updated — Latest diff uploaded
This change finishes up modernization of the
chunk_generator
,
differ
, andopcode_generator
files in the diffviewer. For the most
part this just involves fixing up docstrings and adding type hints.The one functional change in here is a fix for a subtle bug that I
discovered when working through this: when computing headers, we were
subtracting 1 from the end line numbers of the chunk twice: once in
_new_chunk
, and once in_get_interesting_headers
. This meant we'd
stop iterating one line too soon. We obviously didn't notice any bugs in
practice, but it's possible that it was affecting the header
computation, especially for chunks that are only a single line.
- Ran unit tests.
- Smoke tested a bunch of diffs.