Skip to content

Commit c4a8d5f

Browse files
authored
Update pool.py
1 parent c6ef4ec commit c4a8d5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ydb/aio/pool.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import asyncio
22
import logging
33
import random
4+
import typing
45

56
from ydb import issues
67
from ydb.pool import ConnectionsCache as _ConnectionsCache, IConnectionPool
78

8-
from .connection import Connection
9+
from .connection import Connection, EndpointKey
910

1011
from . import resolver
1112

@@ -21,7 +22,7 @@ def __init__(self, use_all_nodes: bool = False):
2122

2223
self._fast_fail_error = None
2324

24-
async def get(self, preferred_endpoint=None, fast_fail=False, wait_timeout=10):
25+
async def get(self, preferred_endpoint: typing.Optional[EndpointKey] = None, fast_fail=False, wait_timeout=10):
2526

2627
if fast_fail:
2728
await asyncio.wait_for(self._fast_fail_event.wait(), timeout=wait_timeout)

0 commit comments

Comments
 (0)