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 2 (Latest)

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.
305c77dff7f1e91ab0f21fdfb347d2e835100e6b Christian Hammond
reviewboard/diffviewer/parser.py
reviewboard/scmtools/core.py
Loading...