@@ -43,17 +43,17 @@ class _BaseClient:
4343
4444 def __init__ (
4545 self ,
46- debug_truncate_bytes : int = None ,
47- retry_timeout_seconds : int = None ,
48- user_agent_base : str = None ,
49- header_factory : Callable [[], dict ] = None ,
50- max_connection_pools : int = None ,
51- max_connections_per_pool : int = None ,
52- pool_block : bool = True ,
53- http_timeout_seconds : float = None ,
54- extra_error_customizers : List [_ErrorCustomizer ] = None ,
55- debug_headers : bool = False ,
56- clock : Clock = None ,
46+ debug_truncate_bytes : Optional [ int ] = None ,
47+ retry_timeout_seconds : Optional [ int ] = None ,
48+ user_agent_base : Optional [ str ] = None ,
49+ header_factory : Optional [ Callable [[], dict ] ] = None ,
50+ max_connection_pools : Optional [ int ] = None ,
51+ max_connections_per_pool : Optional [ int ] = None ,
52+ pool_block : Optional [ bool ] = True ,
53+ http_timeout_seconds : Optional [ float ] = None ,
54+ extra_error_customizers : Optional [ List [_ErrorCustomizer ] ] = None ,
55+ debug_headers : Optional [ bool ] = False ,
56+ clock : Optional [ Clock ] = None ,
5757 streaming_buffer_size : int = 1024 * 1024 ,
5858 ): # 1MB
5959 """
@@ -148,14 +148,14 @@ def do(
148148 self ,
149149 method : str ,
150150 url : str ,
151- query : dict = None ,
152- headers : dict = None ,
153- body : dict = None ,
151+ query : Optional [ dict ] = None ,
152+ headers : Optional [ dict ] = None ,
153+ body : Optional [ dict ] = None ,
154154 raw : bool = False ,
155155 files = None ,
156156 data = None ,
157- auth : Callable [[requests .PreparedRequest ], requests .PreparedRequest ] = None ,
158- response_headers : List [str ] = None ,
157+ auth : Optional [ Callable [[requests .PreparedRequest ], requests .PreparedRequest ] ] = None ,
158+ response_headers : Optional [ List [str ] ] = None ,
159159 ) -> Union [dict , list , BinaryIO ]:
160160 if headers is None :
161161 headers = {}
@@ -272,9 +272,9 @@ def _perform(
272272 self ,
273273 method : str ,
274274 url : str ,
275- query : dict = None ,
276- headers : dict = None ,
277- body : dict = None ,
275+ query : Optional [ dict ] = None ,
276+ headers : Optional [ dict ] = None ,
277+ body : Optional [ dict ] = None ,
278278 raw : bool = False ,
279279 files = None ,
280280 data = None ,
@@ -325,10 +325,10 @@ class _StreamingResponse(BinaryIO):
325325 _closed : bool = False
326326
327327 def fileno (self ) -> int :
328- pass
328+ return 0
329329
330- def flush (self ) -> int :
331- pass
330+ def flush (self ) -> int : # type: ignore
331+ return 0
332332
333333 def __init__ (self , response : _RawResponse , chunk_size : Union [int , None ] = None ):
334334 self ._response = response
@@ -403,10 +403,10 @@ def truncate(self, __size: Union[int, None] = ...) -> int:
403403 def writable (self ) -> bool :
404404 return False
405405
406- def write (self , s : Union [bytes , bytearray ]) -> int :
406+ def write (self , s : Union [bytes , bytearray ]) -> int : # type: ignore
407407 raise NotImplementedError ()
408408
409- def writelines (self , lines : Iterable [bytes ]) -> None :
409+ def writelines (self , lines : Iterable [bytes ]) -> None : # type: ignore
410410 raise NotImplementedError ()
411411
412412 def __next__ (self ) -> bytes :
0 commit comments