From ebb9c1091be5fa0aefbad35a88b23668805796c5 Mon Sep 17 00:00:00 2001 From: rui Date: Mon, 14 Jul 2025 10:49:51 +0200 Subject: [PATCH] chore: fix lint for releasing --- batched/batch_processor.py | 2 +- batched/inference/helper.py | 4 ++-- batched/inference/model_batch_processor.py | 2 +- batched/utils.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/batched/batch_processor.py b/batched/batch_processor.py index f6403d0..9475564 100644 --- a/batched/batch_processor.py +++ b/batched/batch_processor.py @@ -194,7 +194,7 @@ async def acall(self, item: Union[T, list[T]]) -> Union[U, list[U]]: Returns: U: The inferred result. """ - import asyncio + import asyncio # noqa: PLC0415 if isinstance(item, list): futures = self._schedule(item) diff --git a/batched/inference/helper.py b/batched/inference/helper.py index 14f5ab6..e799447 100644 --- a/batched/inference/helper.py +++ b/batched/inference/helper.py @@ -57,8 +57,8 @@ def torch_or_np(item: Any): def stack_features( - inputs: list[dict[str, Feature]], - pad_tokens: dict[str, int], + inputs: list[dict[str, Feature]], + pad_tokens: dict[str, int], padding_side: str = "right" ) -> dict[str, Feature]: """ diff --git a/batched/inference/model_batch_processor.py b/batched/inference/model_batch_processor.py index 0c430b2..49701ad 100644 --- a/batched/inference/model_batch_processor.py +++ b/batched/inference/model_batch_processor.py @@ -131,7 +131,7 @@ async def acall(self, *args, **kwargs) -> Feature: Returns: ModelOutputs: The processed model outputs. """ - import asyncio + import asyncio # noqa: PLC0415 features = args[0] if args else kwargs unstacked_features = unstack_features(features) diff --git a/batched/utils.py b/batched/utils.py index a20f959..746a8fa 100644 --- a/batched/utils.py +++ b/batched/utils.py @@ -186,7 +186,7 @@ def __init__( **kwargs: Any, ) -> None: with ensure_import("diskcache"): - import diskcache + import diskcache # noqa: PLC0415 path = Path(cache_dir).expanduser().resolve() path.mkdir(parents=True, exist_ok=True)