Skip to content

Commit

Permalink
🩹 Fix mypy complaints for py38
Browse files Browse the repository at this point in the history
  • Loading branch information
waketzheng committed Nov 15, 2024
1 parent fad74f5 commit 274641c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fastapi_cdn_host/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from enum import Enum
from pathlib import Path
from ssl import SSLError
from typing import Any, Callable, Iterable, Literal, Union, cast, overload
from typing import Any, Callable, Iterable, Literal, Tuple, Union, cast, overload

import anyio
import httpx
Expand All @@ -29,15 +29,15 @@
OFFICIAL_REDOC = "https://cdn.redoc.ly/redoc/latest/bundles/"
DEFAULT_ASSET_PATH = ("/swagger-ui-dist@{version}/", "/redoc@next/bundles/")
NORMAL_ASSET_PATH = ("/swagger-ui/{version}/", OFFICIAL_REDOC)
CdnPathInfoType = tuple[
CdnPathInfoType = Tuple[
Annotated[str, "swagger-ui module path info(must startswith '/')"],
Annotated[str, "redoc path or url info(must startswith '/')"],
]
CdnDomainType = Annotated[str, "Host for swagger-ui/redoc"]
StrictCdnHostInfoType = tuple[CdnDomainType, CdnPathInfoType]
StrictCdnHostInfoType = Tuple[CdnDomainType, CdnPathInfoType]
CdnHostInfoType = Union[
Annotated[CdnDomainType, f"Will use DEFAULT_ASSET_PATH: {DEFAULT_ASSET_PATH}"],
tuple[CdnDomainType, Annotated[str, "In case of swagger/redoc has the same path"]],
Tuple[CdnDomainType, Annotated[str, "In case of swagger/redoc has the same path"]],
StrictCdnHostInfoType,
]

Expand Down

0 comments on commit 274641c

Please sign in to comment.