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

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.
ae38039ed9ec286fd4f7df0f26306292ad7bbb73 Christian Hammond
reviewboard/scmtools/core.py
reviewboard/scmtools/registry.py
Loading...