Skip to content

Commit 78b8a52

Browse files
authored
Merge pull request #1205 from sanders41/types
Use TYPE_CHECKING
2 parents 4693591 + ab445aa commit 78b8a52

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

meilisearch_python_sdk/types.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
from __future__ import annotations
22

3-
import sys
43
from collections.abc import MutableMapping
5-
from typing import Any, Union
4+
from typing import TYPE_CHECKING, Any, Union
65

7-
if sys.version_info >= (3, 10): # pragma: no cover
8-
from typing import TypeAlias
9-
else:
10-
from typing_extensions import TypeAlias
6+
if TYPE_CHECKING: # pragma: no cover
7+
import sys
8+
9+
if sys.version_info >= (3, 10):
10+
from typing import TypeAlias
11+
else:
12+
from typing_extensions import TypeAlias
1113

1214
Filter: TypeAlias = Union[str, list[Union[str, list[str]]]]
1315
JsonDict: TypeAlias = dict[str, Any]

0 commit comments

Comments
 (0)