Add typing for diff opcodes.

Review Request #14418 — Created May 2, 2025 and updated — Latest diff uploaded

Information

Review Board
master

Reviewers

This change updates diff opcodes to use explicitly typed tuples. The
opcodes created by the Differ implementation have a tag and ranges,
and then the opcode generator adds an additional metadata field. In the
interest of avoiding any changes, we therefore have separate definitions
for both steps.

  • Did a bunch of smoke testing of diff generation and saw that
    everything still worked correctly.
  • Ran unit tests.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 4. See what's changed.

orig
1
2
3
4

Commits

First Last Summary ID Author
Add typing for diff opcodes.
This change updates diff opcodes to use explicitly typed tuples. The opcodes created by the `Differ` implementation have a tag and ranges, and then the opcode generator adds an additional metadata field. In the interest of avoiding any changes, we therefore have separate definitions for both steps. Testing Done: - Did a bunch of smoke testing of diff generation and saw that everything still worked correctly. - Ran unit tests.
6961dc9470b3655bda576024c5e1c517818f1aa3 David Trowbridge
reviewboard/diffviewer/chunk_generator.py
reviewboard/diffviewer/differ.py
reviewboard/diffviewer/myersdiff.py
reviewboard/diffviewer/opcode_generator.py
reviewboard/diffviewer/processors.py
reviewboard/diffviewer/smdiff.py
reviewboard/diffviewer/tests/test_myersdiff.py
Loading...