Skip to content

Commit c6ef4ec

Browse files
authored
type hints to pool
1 parent 8938db2 commit c6ef4ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ydb/pool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from . import connection as connection_impl, issues, resolver, _utilities, tracing
1010
from abc import abstractmethod
1111

12-
from .connection import Connection
12+
from .connection import Connection, EndpointKey
1313

1414
logger = logging.getLogger(__name__)
1515

@@ -123,7 +123,7 @@ def subscribe(self):
123123
return subscription
124124

125125
@tracing.with_trace()
126-
def get(self, preferred_endpoint=None) -> Connection:
126+
def get(self, preferred_endpoint: Optional[EndpointKey] = None) -> Connection:
127127
with self.lock:
128128
if preferred_endpoint is not None and preferred_endpoint.node_id in self.connections_by_node_id:
129129
return self.connections_by_node_id[preferred_endpoint.node_id]

0 commit comments

Comments
 (0)