"""Module for shared/commonly used type hinting."""
import datetime
from enum import Enum
from typing import Any, Dict, List, Tuple, NamedTuple
TagTupleType = Tuple[str, ...]
TagsToUrlsType = Dict[TagTupleType, List[str]]
TestToTagsType = Dict[str, TagsToUrlsType]
AggregatedResultsType = Dict[str, TestToTagsType]
class ResultTupleType(NamedTuple):
status: str
build_url: str
date: datetime.date
is_slow: bool
typ_expectations: List[str]
TagsToResultType = Dict[TagTupleType, List[ResultTupleType]]
TestStatusToTagsType = Dict[str, TagsToResultType]
AggregatedStatusResultsType = Dict[str, TestStatusToTagsType]
TestToResultCountType = Dict[str, int]
ResultCountType = Dict[TagTupleType, TestToResultCountType]
SingleQueryResultType = Dict[str, Any]
QueryJsonType = List[SingleQueryResultType]
class ResultStatus(str, Enum):
ABORT = "ABORT"
CRASH = "CRASH"
FAIL = "FAIL"