]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Fixes #2666: None is the default value of file for httpx.NetRCAuth (#2667)
authorAlex Prengère <2138730+alexprengere@users.noreply.github.com>
Tue, 18 Apr 2023 09:03:01 +0000 (11:03 +0200)
committerGitHub <noreply@github.com>
Tue, 18 Apr 2023 09:03:01 +0000 (10:03 +0100)
httpx/_auth.py

index e67e0c15c4f94237a76e9b8998de2fd6a63fe103..1d7385d57334c46750d0618a407b49cd829856f4 100644 (file)
@@ -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]: