reformat with black; looks better

This commit is contained in:
Viktor Barzin 2025-05-31 23:50:43 +00:00
parent 1122f5a96f
commit 0b9d50af47
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
11 changed files with 240 additions and 244 deletions

View file

@ -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)