Skip to content

Commit 87bf0b5

Browse files
fix grpc import in issues.py and types.py
1 parent a751097 commit 87bf0b5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ydb/issues.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66

77
from . import _apis
88

9+
# Workaround for good IDE and universal for runtime
910
if typing.TYPE_CHECKING:
1011
from _grpc.v4.protos import ydb_issue_message_pb2, ydb_operation_pb2
12+
else:
13+
from ._grpc.common.protos import ydb_issue_message_pb2, ydb_operation_pb2
1114

1215

1316
_TRANSPORT_STATUSES_FIRST = 401000

ydb/types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
from . import table
1313

1414

15+
# Workaround for good IDE and universal for runtime
1516
if typing.TYPE_CHECKING:
1617
from ._grpc.v4.protos import ydb_value_pb2
18+
else:
19+
from ._grpc.common.protos import ydb_value_pb2
1720

1821

1922
_SECONDS_IN_DAY = 60 * 60 * 24

0 commit comments

Comments
 (0)