Add types, update signatures, and modernize docs for rbtools.utils.diffs.
Review Request #12569 — Created Aug. 24, 2022 and submitted
Information | |
---|---|
chipx86 | |
RBTools | |
release-4.x | |
Reviewers | |
rbtools | |
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: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+266 -38) |
Checks run (2 succeeded)

-
-
rbtools/utils/diffs.py (Diff revision 2) Shouldn't
file_index_re
have to come after the*
in order to be a required keyword argument?
Change Summary:
Fixed an incorrect docstring notice about
file_index_re
having to be a keyword argument.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+266 -38) |