From a16c04c6db4ff533e68a9cffb7b4cdabf0c12c40 Mon Sep 17 00:00:00 2001 From: Zanie Date: Fri, 27 Oct 2023 12:25:55 -0500 Subject: [PATCH] Fix `limited_parallelism` type annotation --- python/ruff-ecosystem/ruff_ecosystem/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ruff-ecosystem/ruff_ecosystem/main.py b/python/ruff-ecosystem/ruff_ecosystem/main.py index 862907c1f1..a152455dc4 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/main.py +++ b/python/ruff-ecosystem/ruff_ecosystem/main.py @@ -3,7 +3,7 @@ import dataclasses import json from enum import Enum from pathlib import Path -from typing import TypeVar +from typing import Awaitable, TypeVar from ruff_ecosystem import logger from ruff_ecosystem.check import compare_check, markdown_check_result @@ -42,7 +42,7 @@ async def main( # Limit parallelism to avoid high memory consumption semaphore = asyncio.Semaphore(max_parallelism) - async def limited_parallelism(coroutine: T) -> T: + async def limited_parallelism(coroutine: Awaitable[T]) -> T: async with semaphore: return await coroutine