@@ -38,6 +38,8 @@ def __init__(
3838 client_id : str ,
3939 version : str ,
4040 timeout : Optional [int ] = None ,
41+ # If no custom transport is provided, let httpx use the default
42+ # so we don't overwrite environment configurations like proxies
4143 transport : Optional [httpx .BaseTransport ] = None ,
4244 ) -> None :
4345 super ().__init__ (
@@ -51,9 +53,7 @@ def __init__(
5153 base_url = base_url ,
5254 timeout = timeout ,
5355 follow_redirects = True ,
54- # Only pass the transport if a custom one is provided, otherwise let httpx use
55- # the default so we don't overwrite environment configurations like proxies
56- transport = transport if transport else None ,
56+ transport = transport ,
5757 )
5858
5959 def is_closed (self ) -> bool :
@@ -138,6 +138,8 @@ def __init__(
138138 client_id : str ,
139139 version : str ,
140140 timeout : Optional [int ] = None ,
141+ # If no custom transport is provided, let httpx use the default
142+ # so we don't overwrite environment configurations like proxies
141143 transport : Optional [httpx .AsyncBaseTransport ] = None ,
142144 ) -> None :
143145 super ().__init__ (
@@ -151,9 +153,7 @@ def __init__(
151153 base_url = base_url ,
152154 timeout = timeout ,
153155 follow_redirects = True ,
154- # Only pass the transport if a custom one is provided, otherwise let httpx use
155- # the default so we don't overwrite environment configurations like proxies
156- transport = transport if transport else None ,
156+ transport = transport ,
157157 )
158158
159159 def is_closed (self ) -> bool :
0 commit comments