Skip to content

Commit 82dd273

Browse files
committed
Add type annotations to _validate_port_spec
1 parent bae282e commit 82dd273

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

asyncpg/connect_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import asyncio
99
import collections
10+
from collections.abc import Sequence
1011
import enum
1112
import functools
1213
import getpass
@@ -165,7 +166,9 @@ def _read_password_from_pgpass(
165166
return None
166167

167168

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

0 commit comments

Comments
 (0)