Add type hints for the diff parsing code.

Review Request #14010 — Created July 3, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

This updates reviewboard.diffviewer.parser to include full type hints,
making it easier to properly implement a diff parser or change diff
parsing logic. This is being done in preparation for additional work for
diff parsers.

Several methods have been updated to require keyword-only arguments,
deprecating positional arguments.

We also had some parameters that were meant to be removed back in
Review Board 6. We never added deprecation warnings for those changes,
so those have been added, and the deprecations have been pushed to
Review Board 9.

Unit tests pass.

Diff Revision 1

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

orig
1
2

Commits

First Last Summary ID Author
Add type hints for the diff parsing code.
This updates `reviewboard.diffviewer.parser` to include full type hints, making it easier to properly implement a diff parser or change diff parsing logic. This is being done in preparation for additional work for diff parsers. Several methods have been updated to require keyword-only arguments, deprecating positional arguments. We also had some parameters that were meant to be removed back in Review Board 6. We never added deprecation warnings for those changes, so those have been added, and the deprecations have been pushed to Review Board 9.
26a76a668cbff05ca02157b64b3b2ec0760e36a7 Christian Hammond
reviewboard/diffviewer/parser.py
Loading...