Skip to content

Commit 7c51d34

Browse files
committed
typing
1 parent b47f346 commit 7c51d34

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/unstructured_client/_hooks/custom/form_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import logging
4-
from typing import Union
4+
from typing import TYPE_CHECKING, Union
55
from typing_extensions import TypeAlias
66

77
from requests_toolbelt.multipart.decoder import MultipartDecoder # type: ignore
@@ -10,7 +10,9 @@
1010
from unstructured_client.models import shared
1111

1212
logger = logging.getLogger(UNSTRUCTURED_CLIENT_LOGGER_NAME)
13-
FormData: TypeAlias = dict[str, Union[str, shared.Files, list[str]]]
13+
14+
if TYPE_CHECKING:
15+
FormData: TypeAlias = dict[str, str | shared.Files | list[str]]
1416

1517
PARTITION_FORM_FILES_KEY = "files"
1618
PARTITION_FORM_SPLIT_PDF_PAGE_KEY = "split_pdf_page"

0 commit comments

Comments
 (0)