Changeset View
Changeset View
Standalone View
Standalone View
swh/web/common/typing.py
# Copyright (C) 2020 The Software Heritage developers | # Copyright (C) 2020 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU Affero General Public License version 3, or any later version | # License: GNU Affero General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from typing import Any, Dict, List, Optional, Union | from swh.core.api.classes import PagedResult as CorePagedResult | ||||
from typing import Any, Dict, List, Optional, TypeVar, Union | |||||
from typing_extensions import TypedDict | from typing_extensions import TypedDict | ||||
from django.http import QueryDict | from django.http import QueryDict | ||||
QueryParameters = Union[Dict[str, Any], QueryDict] | QueryParameters = Union[Dict[str, Any], QueryDict] | ||||
class OriginInfo(TypedDict): | class OriginInfo(TypedDict): | ||||
▲ Show 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | class RevisionMetadata(SWHObjectInfo, SWHObjectInfoMetadata): | ||||
committer_date: str | committer_date: str | ||||
directory: str | directory: str | ||||
merge: bool | merge: bool | ||||
metadata: str | metadata: str | ||||
parents: List[str] | parents: List[str] | ||||
synthetic: bool | synthetic: bool | ||||
type: str | type: str | ||||
snapshot: Optional[str] | snapshot: Optional[str] | ||||
TResult = TypeVar("TResult") | |||||
PagedResult = CorePagedResult[TResult, str] |