Add type hints to SCMToolRegistry.

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

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.

Summary ID
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
Description From Last Updated

undefined name 'ClassVar' Column: 17 Error code: F821

reviewbotreviewbot

Mind fixing the grammar here while you're at it?

daviddavid
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. 
      
  2. reviewboard/scmtools/registry.py (Diff revision 2)
     
     
    Show all issues

    Mind fixing the grammar here while you're at it?

  3. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (15d4a52)