reformat with black; looks better
This commit is contained in:
parent
1122f5a96f
commit
0b9d50af47
11 changed files with 240 additions and 244 deletions
|
|
@ -9,13 +9,13 @@ async def detect_floorplan(listing_paths: list[str]):
|
|||
cpu_count = multiprocessing.cpu_count() // 4
|
||||
semaphore = asyncio.Semaphore(cpu_count)
|
||||
|
||||
await tqdm.gather(*[
|
||||
_detect_floorplan_with_semaphore(listing, semaphore)
|
||||
for listing in listings
|
||||
])
|
||||
await tqdm.gather(
|
||||
*[_detect_floorplan_with_semaphore(listing, semaphore) for listing in listings]
|
||||
)
|
||||
|
||||
|
||||
async def _detect_floorplan_with_semaphore(listing: Listing,
|
||||
semaphore: asyncio.Semaphore):
|
||||
async def _detect_floorplan_with_semaphore(
|
||||
listing: Listing, semaphore: asyncio.Semaphore
|
||||
):
|
||||
async with semaphore:
|
||||
return await listing.calculate_sqm_ocr(recalculate=False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue