Add typing for diff opcodes.

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

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.
Summary ID
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.
f79f187458dcc42cf79371d2bc4670665d895ff8
Description From Last Updated

'typing.Any' imported but unused Column: 1 Error code: F401

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
david
Review request changed
Commits:
Summary ID
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
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.
f79f187458dcc42cf79371d2bc4670665d895ff8

Checks run (2 succeeded)

flake8 passed.
JSHint passed.