Skip to content

Commit

Permalink
lint: again
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Aug 28, 2023
1 parent 75cb1dc commit 6b3dbef
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bento_aggregation_service/service_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,20 @@ async def _get_data_types_for_service(s: aiohttp.ClientSession, ds: GA4GHService
self._logger.error(f"Recieved error from data-types URL {dt_url}: {r.status} {await r.json()}")
return ()

payload = await r.json()
service_dts: list[GA4GHServiceInfo] = payload
service_dts: list[GA4GHServiceInfo] = await r.json()
return tuple(
DataType.model_validate({"service_base_url": service_base_url, "data_type_listing": sdt})
for sdt in service_dts
)

session: aiohttp.ClientSession
async with self._http_session(existing=existing_session) as session:
dts: tuple[tuple[DataType, ...], ...] = await asyncio.gather(
dts_nested: tuple[tuple[DataType, ...], ...] = await asyncio.gather(
*(_get_data_types_for_service(session, ds) for ds in data_services))

return {
dt.data_type_listing.id: dt
for dts_item in dts for dt in dts_item
for dts_item in dts_nested for dt in dts_item
}


Expand Down

0 comments on commit 6b3dbef

Please sign in to comment.