Add types, update signatures, and modernize docs for rbtools.utils.diffs.

Review Request #12569 — Created Aug. 24, 2022 and submitted — Latest diff uploaded

Information

RBTools
release-4.x

Reviewers

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.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

orig
1
2
3

Commits

First Last Summary ID Author
Add types, update signatures, and modernize docs for rbtools.utils.diffs.
`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).
d45f9a38494d3a2bf50f315cf263bcdc902ed9df Christian Hammond
rbtools/utils/diffs.py
Loading...