Skip to content

Commit 92f3ae6

Browse files
committed
Add type annotations to _validate_port_spec
1 parent a273e0e commit 92f3ae6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

asyncpg/connect_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import asyncio
1010
import collections
11-
from collections.abc import Callable
11+
from collections.abc import Callable, Sequence
1212
import enum
1313
import functools
1414
import getpass
@@ -167,7 +167,9 @@ def _read_password_from_pgpass(
167167
return None
168168

169169

170-
def _validate_port_spec(hosts, port):
170+
def _validate_port_spec(
171+
hosts: "Sequence[object]", port: typing.Union[int, typing.List[int]]
172+
) -> typing.List[int]:
171173
if isinstance(port, list):
172174
# If there is a list of ports, its length must
173175
# match that of the host list.

0 commit comments

Comments
 (0)