Make ReviewUI generic for typing purposes.

Review Request #13696 — Created April 4, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

This change adds generic typing for the ReviewUI class, allowing us to
specify in the subclass what the object type, comment type, and
serialized comment type are. This prevents the need for a bunch of
cast calls in the subclasses.

Ran unit tests.

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
Make ReviewUI generic for typing purposes.
This change adds generic typing for the ReviewUI class, allowing us to specify in the subclass what the object type, comment type, and serialized comment type are. This prevents the need for a bunch of `cast` calls in the subclasses. Testing Done: Ran unit tests.
a87cda8f63b0fcbde7c384bd7e86330bc414faee David Trowbridge
reviewboard/reviews/ui/base.py
reviewboard/reviews/ui/diff.py
reviewboard/reviews/ui/image.py
reviewboard/reviews/ui/markdownui.py
reviewboard/reviews/ui/screenshot.py
reviewboard/reviews/ui/text.py
Loading...