Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/archive.py
from typing import Any, Dict, List | from typing import Any, Dict, Iterable, List | ||||
from typing_extensions import Protocol, runtime_checkable | from typing_extensions import Protocol, runtime_checkable | ||||
@runtime_checkable | @runtime_checkable | ||||
class ArchiveInterface(Protocol): | class ArchiveInterface(Protocol): | ||||
def directory_ls(self, id: bytes) -> List[Dict[str, Any]]: | def directory_ls(self, id: bytes) -> List[Dict[str, Any]]: | ||||
... | ... | ||||
def iter_origins(self): | def iter_origins(self): | ||||
... | ... | ||||
def iter_origin_visits(self, origin: str): | def iter_origin_visits(self, origin: str): | ||||
... | ... | ||||
def iter_origin_visit_statuses(self, origin: str, visit: int): | def iter_origin_visit_statuses(self, origin: str, visit: int): | ||||
... | ... | ||||
def release_get(self, ids: List[bytes]): | def release_get(self, ids: Iterable[bytes]): | ||||
... | ... | ||||
def revision_get(self, ids: List[bytes]): | def revision_get(self, ids: Iterable[bytes]): | ||||
... | ... | ||||
vlorentz: why? | |||||
Done Inline Actionswhy should I enforce a list here? douardda: why should I enforce a list here? | |||||
def snapshot_get_all_branches(self, snapshot: bytes): | def snapshot_get_all_branches(self, snapshot: bytes): | ||||
... | ... |
why?