Add type hints to SCMToolRegistry.

Review Request #13474 — Created Jan. 1, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This fleshes out the type hints in SCMToolRegistry, ensuring that the
registration implementation code and consumers of the registry are all
aware of what types are being put in and returned.

Some code has been modernized in the process. Namely, converting
super() calls to their short form, and leveraging yield from and
f-strings.

This is in preparation for some work that will lead to new SCM support.

Unit tests pass.

Type checkers pass.

Verified the typing when fetching resulting tools.

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 to SCMToolRegistry.
This fleshes out the type hints in `SCMToolRegistry`, ensuring that the registration implementation code and consumers of the registry are all aware of what types are being put in and returned. Some code has been modernized in the process. Namely, converting `super()` calls to their short form, and leveraging `yield from` and f-strings. This is in preparation for some work that will lead to new SCM support.
be394896258da3fb81aa3b5ce690fcc955a8e252 Christian Hammond
reviewboard/scmtools/core.py
reviewboard/scmtools/registry.py
Loading...