Skip to content

Commit 7e23777

Browse files
pr comments
1 parent 23c2c02 commit 7e23777

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

indico/client/client.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,20 @@ def call(self, request: Union[HTTPRequest, RequestChain]):
8282

8383
def call_concurrent(self, requests: list[HTTPRequest]) -> list[dict]:
8484
"""
85-
Make batched calls to Indico IPA Platform with thread pool.
85+
Make batched calls to Indico IPA Platform with thread pool.
8686
87-
Args:
88-
request (GraphQLRequest or RequestChain): GraphQL request to send to the Indico Platform
87+
Args:
88+
request (GraphQLRequest or RequestChain): GraphQL request to send to the Indico Platform
8989
90-
Returns:
91-
Response appropriate to the class of the provided request parameter. Often JSON but not always.
90+
Returns:
91+
Response appropriate to the class of the provided request parameter. Often JSON but not always.
9292
93-
Raises:
94-
IndicoRequestError: With errors in processing the request
93+
Raises:
94+
IndicoRequestError: With errors in processing the request
95+
96+
Example: uploaded_files = client.call_concurrent(
97+
[UploadSigned(f) for f in dataset_filepaths]
98+
)
9599
"""
96100
data: list[dict] = []
97101
with THREAD_POOL as executor:

indico/queries/storage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class GetUploadURL(GraphQLRequest):
188188
def __init__(self):
189189
super().__init__(self.query)
190190

191-
def process_response(self, response: dict) -> dict:
191+
def process_response(self, response: dict) -> dict[str, str]:
192192
response = super().process_response(response)
193193

194194
return {
@@ -228,7 +228,7 @@ class UploadSigned(RequestChain):
228228
def __init__(self, file: str):
229229
self.file = file
230230

231-
def requests(self) -> list[dict]:
231+
def requests(self) -> list[dict[str, dict]]:
232232
self.result: dict = {}
233233
yield GetUploadURL()
234234

0 commit comments

Comments
 (0)