Update TypedProperty usage to benefit from type hints.

Review Request #13063 — Created May 24, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

Djblets received support for type hints for TypedProperty. While
verbose, this allows us to ensure that the right values are going into
and coming out of these properties.

This updates all usage to incorporate typing, and adds typing
information for a few additional fields in some of the affected classes.

An argument could be made for switching away from TypedProperty in
time. However, it's still useful for ensuring strict types in key areas
like diff parsing and SCM results.

Unit tests pass.

Checked that pyright and mypy were happy.

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
Update TypedProperty usage to benefit from type hints.
Djblets received support for type hints for `TypedProperty`. While verbose, this allows us to ensure that the right values are going into and coming out of these properties. This updates all usage to incorporate typing, and adds typing information for a few additional fields in some of the affected classes. An argument could be made for switching away from `TypedProperty` in time. However, it's still useful for ensuring strict types in key areas like diff parsing and SCM results.
3957cf4871f978016584fd28a7ae94229f2d48ca Christian Hammond
reviewboard/diffviewer/parser.py
reviewboard/scmtools/core.py
Loading...