Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/interface.py
Show First 20 Lines • Show All 709 Lines • ▼ Show 20 Lines | ) -> Optional[Dict[str, Any]]: | ||||
* **next_branch**: the name of the first branch not returned | * **next_branch**: the name of the first branch not returned | ||||
or :const:`None` if the snapshot has less than 1000 | or :const:`None` if the snapshot has less than 1000 | ||||
branches. | branches. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("snapshot/count_branches") | @remote_api_endpoint("snapshot/count_branches") | ||||
def snapshot_count_branches(self, snapshot_id: Sha1Git) -> Optional[Dict[str, int]]: | def snapshot_count_branches( | ||||
self, snapshot_id: Sha1Git | |||||
) -> Optional[Dict[Optional[str], int]]: | |||||
"""Count the number of branches in the snapshot with the given id | """Count the number of branches in the snapshot with the given id | ||||
Args: | Args: | ||||
snapshot_id: snapshot identifier | snapshot_id: snapshot identifier | ||||
Returns: | Returns: | ||||
A dict whose keys are the target types of branches and values their | A dict whose keys are the target types of branches and values their | ||||
corresponding amount | corresponding amount | ||||
▲ Show 20 Lines • Show All 563 Lines • Show Last 20 Lines |