Add type hints to ReviewUI implementation.

Review Request #13514 — Created Jan. 31, 2024 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

This change adds type hints to the Python side of the Review UI
implementation.

While I was in here, I also discovered that the screenshot Review UI was
calling into Screenshot.display_id, which didn't exist. This code path
is effectively dead because the vast majority of installs don't use the
Screenshot model at all, but it could theoretically cause crashes on
very old review requests that do.

Ran unit tests.

Diff Revision 1

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 type hints to ReviewUI implementation.
This change adds type hints to the Python side of the Review UI implementation. While I was in here, I also discovered that the screenshot Review UI was calling into Screenshot.display_id, which didn't exist. This code path is effectively dead because the vast majority of installs don't use the Screenshot model at all, but it could theoretically cause crashes on very old review requests that do. Testing Done: Ran unit tests.
314f71f36cf9688abd833a912c646c48dcaff0d9 David Trowbridge
reviewboard/reviews/models/screenshot.py
reviewboard/reviews/ui/base.py
reviewboard/reviews/ui/image.py
reviewboard/reviews/ui/markdownui.py
reviewboard/reviews/ui/screenshot.py
reviewboard/reviews/ui/text.py
Loading...