Skip to content

Commit 7e53835

Browse files
committed
Fix python 3.8 typing
1 parent 6070923 commit 7e53835

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

ydb_dbapi/cursors.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from collections.abc import Generator
66
from collections.abc import Iterator
77
from collections.abc import Sequence
8+
from typing import TYPE_CHECKING
89
from typing import Any
910
from typing import Union
1011

@@ -18,14 +19,15 @@
1819
from .utils import handle_ydb_errors
1920
from .utils import maybe_get_current_trace_id
2021

21-
ParametersType = dict[
22-
str,
23-
Union[
24-
Any,
25-
tuple[Any, Union[ydb.PrimitiveType, ydb.AbstractTypeBuilder]],
26-
ydb.TypedValue,
27-
],
28-
]
22+
if TYPE_CHECKING:
23+
ParametersType = dict[
24+
str,
25+
Union[
26+
Any,
27+
tuple[Any, Union[ydb.PrimitiveType, ydb.AbstractTypeBuilder]],
28+
ydb.TypedValue,
29+
],
30+
]
2931

3032

3133
def _get_column_type(type_obj: Any) -> str:

0 commit comments

Comments
 (0)