File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010def _build_request (
1111 client : Client ,
1212 username : str ,
13- config : SessionToken ,
13+ config : list [ SessionToken ] ,
1414 retries : int = None ,
1515 timeout : float = None ,
1616):
17- if not isinstance (config , dict ):
18- config = config .model_dump ()
17+ if not isinstance (config , list ) or not all (isinstance (data , SessionToken ) for data in config ):
18+ raise TypeError ("Must be a list of SessionToken" )
19+ config = [data .model_dump () if isinstance (data , SessionToken ) else data for data in config ]
1920 if not retries :
2021 retries = client .retries
2122 if not timeout :
@@ -32,7 +33,7 @@ def _build_request(
3233
3334def _build_response (response : httpx .Response ):
3435 if response .status_code == 200 :
35- response_200 = TypeAdapter (SessionToken ).validate_python (response .json ())
36+ response_200 = TypeAdapter (list [ SessionToken ] ).validate_python (response .json ())
3637 return response_200
3738 else :
3839 response_error = TypeAdapter (Error ).validate_python (response .json ())
You can’t perform that action at this time.
0 commit comments