File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22from typing import Dict
33from typing import List
44from typing import Optional
5+ from typing import Self
56from typing import Type
67from typing import TypeVar
78
@@ -141,7 +142,7 @@ def map_exception(self, response: Response) -> Type[errors.CheckedIDError]:
141142class ClientAsync (Client ):
142143 """for asyncio"""
143144
144- def create_client (self , base_url ):
145+ def create_client (self , base_url ) -> None :
145146 self .client = httpx .AsyncClient (base_url = base_url )
146147
147148 async def dossier (self , dossier_number : str ) -> endpoints .DossierEndpoint .response :
@@ -151,17 +152,17 @@ async def dossier(self, dossier_number: str) -> endpoints.DossierEndpoint.respon
151152
152153 return self .process_response (response , endpoints .DossierEndpoint .response )
153154
154- def close (self ):
155+ def close (self ) -> None :
155156 self .client .aclose ()
156157
157- def open (self ):
158+ def open (self ) -> None :
158159 self .create_client (self .base_url )
159160
160- def __enter__ (self ):
161+ def __enter__ (self ) -> Self :
161162 """Open the httpx client"""
162163 self .open ()
163164 return self
164165
165- def __exit__ (self , exc_type , exc_val , exc_tb ):
166+ def __exit__ (self , exc_type , exc_val , exc_tb ) -> None :
166167 """Close the httpx client"""
167168 self .close ()
You can’t perform that action at this time.
0 commit comments