Add types, update signatures, and modernize docs for rbtools.utils.diffs.
Review Request #12569 — Created Aug. 24, 2022 and submitted
rbtools.utils.diffs
is used in a lot of diff-generation code, and is
sensitive to string types. These functions are old, lacking modern docs,
and contain positional arguments that are non-obvious.This change adds type annotations to all the functions in here. It also
updates all documentation for our modern standards, and switches some
parameters to keyword-only (deprecating but still allowing them as
positional arguments).
Unit tests pass on Python 3.7-3.11.
- Change Summary:
-
Fixed a docstring to reference a keyword argument as a singular and not a plural.
- Commits:
-
Summary ID 42b64e60e4aacfe4bab8b690c6e3e112ec7b925d d45f9a38494d3a2bf50f315cf263bcdc902ed9df - Diff:
-
Revision 2 (+266 -38)
Checks run (2 succeeded)
- Change Summary:
-
Fixed an incorrect docstring notice about
file_index_re
having to be a keyword argument. - Commits:
-
Summary ID d45f9a38494d3a2bf50f315cf263bcdc902ed9df ef26f047fec428e7a8895f467c1d54272367830d - Diff:
-
Revision 3 (+266 -38)