We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_validate_port_spec
1 parent bae282e commit 82dd273Copy full SHA for 82dd273
asyncpg/connect_utils.py
@@ -7,6 +7,7 @@
7
8
import asyncio
9
import collections
10
+from collections.abc import Sequence
11
import enum
12
import functools
13
import getpass
@@ -165,7 +166,9 @@ def _read_password_from_pgpass(
165
166
return None
167
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]:
172
if isinstance(port, list):
173
# If there is a list of ports, its length must
174
# match that of the host list.
0 commit comments