From: Alex Prengère <2138730+alexprengere@users.noreply.github.com> Date: Tue, 18 Apr 2023 09:03:01 +0000 (+0200) Subject: Fixes #2666: None is the default value of file for httpx.NetRCAuth (#2667) X-Git-Tag: 0.24.1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1cc6b2462e95b84315c67bd5aefb33df73d06c4;p=thirdparty%2Fhttpx.git Fixes #2666: None is the default value of file for httpx.NetRCAuth (#2667) --- diff --git a/httpx/_auth.py b/httpx/_auth.py index e67e0c15..1d7385d5 100644 --- a/httpx/_auth.py +++ b/httpx/_auth.py @@ -147,7 +147,7 @@ class NetRCAuth(Auth): Use a 'netrc' file to lookup basic auth credentials based on the url host. """ - def __init__(self, file: typing.Optional[str]): + def __init__(self, file: typing.Optional[str] = None): self._netrc_info = netrc.netrc(file) def auth_flow(self, request: Request) -> typing.Generator[Request, Response, None]: