Add new resources, part 3/7.
Review Request #14342 — Created Feb. 10, 2025 and updated
This change adds the following new resource implementations:
- RepositoryItemResource
- RepositoryListResource
- RepositoryBranchItemResource
- RepositoryBranchListResource
- RepositoryCommitItemResource
- RepositoryCommitListResource
- RepositoryGroupItemResource
- RepositoryGroupListResource
- RepositoryInfoResource
- RepositoryUserItemResource
- RepositoryUserListResourceThis involves one update to our base ListResource implementation (and
various related plumbing) to allow subclasses to force a specific class
type to be used for items. In the case of repository branches and
commits, these are list resources that do not have an associated item
endpoint or mimetype, and so the basic_wrap_field()
and create
functionality was returning a plainItemResource
. For this case,
ListResource
subclasses can now set_item_resource_type
to force a
specific item resource subclass instead.
- Ran unit tests.
- Used the new resources from a test script and saw that everything
worked as expected.
Summary | ID |
---|---|
d057edfb7b4505d7f80c332c9a5e98e2fd7bac62 |
Description | From | Last Updated |
---|---|---|
redefinition of unused 'Unpack' from line 11 Column: 5 Error code: F811 |
![]() |
|
line too long (80 > 79 characters) Column: 80 Error code: E501 |
![]() |
|
While here, can we update create_resource to be keyword-only (with deprecation)? If not, we should at least make this new … |
|
|
Needs a Version Added here and a Version Changed in the function doc body. |
|
|
Some notes regarding keyword-only arguments. This applies to other methods below. |
|
|
Same notes regarding version documentation. This applies to other methods below. |
|
|
This should now be a Mapping. |
|
|
This should also be a Mapping. Same elsewhere. |
|
|
Missing a trailing period. |
|
- Commits:
-
Summary ID 74ffb631670b659fe47e0e19ecef60a81e7bf530 5c04aeada7d8104c17bb1e9c8186bc542d51a7b2 - Diff:
-
Revision 2 (+2206 -176)
Checks run (2 succeeded)
- Commits:
-
Summary ID 5c04aeada7d8104c17bb1e9c8186bc542d51a7b2 8d69d4f76410fb585a5d50b9779a96890b422fc4 - Diff:
-
Revision 3 (+2206 -174)
Checks run (2 succeeded)
- Commits:
-
Summary ID 8d69d4f76410fb585a5d50b9779a96890b422fc4 d057edfb7b4505d7f80c332c9a5e98e2fd7bac62 - Diff:
-
Revision 4 (+2248 -174)