Fixes #2666: None is the default value of file for httpx.NetRCAuth (#2667)

This commit is contained in:
Alex Prengère 2023-04-18 11:03:01 +02:00 committed by GitHub
parent 4b5a92e88e
commit c1cc6b2462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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]: