Skip to content

Commit ffd8087

Browse files
committed
Fix and improve typing of _read_password_from_pgpass
1 parent 0983306 commit ffd8087

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
@@ -131,11 +131,13 @@ def _read_password_file(passfile: pathlib.Path) \
131131

132132

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

0 commit comments

Comments
 (0)