Skip to content

Commit b1c0e45

Browse files
committed
Typing fix for python3.9
1 parent 716140a commit b1c0e45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/yandex_cloud_ml_sdk/_tools/function.py

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

3-
from typing import TypeVar, cast
3+
from typing import Optional, TypeVar, cast
44

55
from yandex_cloud_ml_sdk._types.domain import BaseDomain
66
from yandex_cloud_ml_sdk._types.misc import UNDEFINED, UndefinedOr, get_defined_value
@@ -23,11 +23,11 @@ def __call__(
2323
schema = schema_from_parameters(parameters)
2424
description_ = (
2525
get_defined_value(description, None) or
26-
cast(str | None, schema.get('description'))
26+
cast(Optional[str], schema.get('description'))
2727
)
2828
name_ = (
2929
get_defined_value(name, None) or
30-
cast(str | None, schema.get('title'))
30+
cast(Optional[str], schema.get('title'))
3131
)
3232

3333
if not name_:

0 commit comments

Comments
 (0)