Skip to content

Commit 6e15f46

Browse files
committed
Fix and improve typing of _read_password_from_pgpass
1 parent 8dd1a76 commit 6e15f46

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

asyncpg/connect_utils.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,13 @@ def _read_password_file(passfile: pathlib.Path) \
130130

131131

132132
def _read_password_from_pgpass(
133-
*, passfile: typing.Optional[pathlib.Path],
134-
hosts: typing.List[str],
135-
ports: typing.List[int],
136-
database: str,
137-
user: str):
133+
*,
134+
passfile: pathlib.Path,
135+
hosts: "Sequence[str]",
136+
ports: typing.List[int],
137+
database: str,
138+
user: str
139+
) -> typing.Optional[str]:
138140
"""Parse the pgpass file and return the matching password.
139141
140142
:return:

0 commit comments

Comments
 (0)