Add types and require keyword-only args for PatchAuthor and PatchResult.

Review Request #13965 — Created June 8, 2024 and updated

Information

RBTools
release-5.x

Reviewers

In preparation for upcoming work, we've made a couple future-proofing
changes for PatchAuthor and PatchResult.

Both classes now take keyword-only arguments, rather than positional
arguments. Callers can continue to pass in positional arguments for now,
but this is deprecated and will be removed in RBTools 7. The RBTools
codebase already passes in all arguments as keywords.

They also now provide type hints for the attributes and the constructor
methods.

Unit tests pass.

Summary ID
Add types and require keyword-only args for PatchAuthor and PatchResult.
In preparation for upcoming work, we've made a couple future-proofing changes for `PatchAuthor` and `PatchResult`. Both classes now take keyword-only arguments, rather than positional arguments. Callers can continue to pass in positional arguments for now, but this is deprecated and will be removed in RBTools 7. The RBTools codebase already passes in all arguments as keywords. They also now provide type hints for the attributes and the constructor methods.
fb868b48a5ac71bfac20e6db4ecb5f4941b176cc
chipx86
Review request changed
Change Summary:

Fixed the patch_content type to be bytes instead of the (incorrectly-documented) str.

Commits:
Summary ID
Add types and require keyword-only args for PatchAuthor and PatchResult.
In preparation for upcoming work, we've made a couple future-proofing changes for `PatchAuthor` and `PatchResult`. Both classes now take keyword-only arguments, rather than positional arguments. Callers can continue to pass in positional arguments for now, but this is deprecated and will be removed in RBTools 7. The RBTools codebase already passes in all arguments as keywords. They also now provide type hints for the attributes and the constructor methods.
6dea05a5b84591eba1a3c0752d67d473959222c4
Add types and require keyword-only args for PatchAuthor and PatchResult.
In preparation for upcoming work, we've made a couple future-proofing changes for `PatchAuthor` and `PatchResult`. Both classes now take keyword-only arguments, rather than positional arguments. Callers can continue to pass in positional arguments for now, but this is deprecated and will be removed in RBTools 7. The RBTools codebase already passes in all arguments as keywords. They also now provide type hints for the attributes and the constructor methods.
fb868b48a5ac71bfac20e6db4ecb5f4941b176cc

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
maubin
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2.