Changeset View
Changeset View
Standalone View
Standalone View
swh/web/utils/typing.py
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | class SnapshotBranchInfo(TypedDict): | ||||
directory: Optional[str] | directory: Optional[str] | ||||
"""directory associated to branch heading revision""" | """directory associated to branch heading revision""" | ||||
message: Optional[str] | message: Optional[str] | ||||
"""message of branch heading revision""" | """message of branch heading revision""" | ||||
name: str | name: str | ||||
"""branch name""" | """branch name""" | ||||
alias: bool | alias: bool | ||||
"""define if the branch is an alias""" | """define if the branch is an alias""" | ||||
revision: str | target_type: str | ||||
"""branch heading revision""" | """branch target type: content, directory or revision""" | ||||
target: str | |||||
"""branch target id""" | |||||
url: Optional[str] | url: Optional[str] | ||||
"""optional browse URL (content, directory, ...) scoped to branch""" | """optional browse URL (content, directory, ...) scoped to branch""" | ||||
class SnapshotReleaseInfo(TypedDict): | class SnapshotReleaseInfo(TypedDict): | ||||
branch_name: str | branch_name: str | ||||
"""branch name associated to release in snapshot""" | """branch name associated to release in snapshot""" | ||||
date: str | date: str | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | class SnapshotContext(TypedDict): | ||||
snapshot_sizes: Dict[str, int] | snapshot_sizes: Dict[str, int] | ||||
"""snapshot sizes grouped by branch target type""" | """snapshot sizes grouped by branch target type""" | ||||
snapshot_swhid: str | snapshot_swhid: str | ||||
"""snapshot SWHID""" | """snapshot SWHID""" | ||||
url_args: Dict[str, Any] | url_args: Dict[str, Any] | ||||
"""common URL arguments when browsing snapshot content""" | """common URL arguments when browsing snapshot content""" | ||||
visit_info: Optional[OriginVisitInfo] | visit_info: Optional[OriginVisitInfo] | ||||
"""optional origin visit info associated to the snapshot""" | """optional origin visit info associated to the snapshot""" | ||||
directory_url: Optional[str] | browse_url: Optional[str] | ||||
"""optional root directory URL associated to the snapshot""" | """optional browse URL associated to the snapshot""" | ||||
class SWHObjectInfo(TypedDict): | class SWHObjectInfo(TypedDict): | ||||
object_type: ObjectType | object_type: ObjectType | ||||
object_id: Optional[str] | object_id: Optional[str] | ||||
class SWHIDContext(TypedDict, total=False): | class SWHIDContext(TypedDict, total=False): | ||||
▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines |