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 a273e0e commit 92f3ae6Copy full SHA for 92f3ae6
asyncpg/connect_utils.py
@@ -8,7 +8,7 @@
8
9
import asyncio
10
import collections
11
-from collections.abc import Callable
+from collections.abc import Callable, Sequence
12
import enum
13
import functools
14
import getpass
@@ -167,7 +167,9 @@ def _read_password_from_pgpass(
167
return None
168
169
170
-def _validate_port_spec(hosts, port):
+def _validate_port_spec(
171
+ hosts: "Sequence[object]", port: typing.Union[int, typing.List[int]]
172
+) -> typing.List[int]:
173
if isinstance(port, list):
174
# If there is a list of ports, its length must
175
# match that of the host list.
0 commit comments