Clean up BaseSCMClient and make better use of type annotations.
Review Request #12558 — Created Aug. 20, 2022 and submitted
Much of the RBTools codebase involves working with SCMClients. With a
lot being done to enhance SCMClients and prepare them for new diff
tools, sand with variations in expectations on parameters and types,
it's worth taking the time to really standardize the types in use and
the ways in which we define and invoke methods.
This change adds type annotations to all the function definitions and
class and instance attributes in
BaseSCMClient, and to add
keyword-only arguments to many of the methods. This will enable type
checking to more strictly check any code going into RBTools from here on
Many of the functions today return dictionaries, and we now define what
keys are expected in those by defining
The subclasses haven't been cleaned up yet, but that can be handled
Unit tests pass on Python 3.7-3.11.
Differentiated between keys that must be provided and keys that are truly optional in the
Revision 2 (+920 -310)
Checks run (2 succeeded)