From 6664a7b8a29f6305e992b5a92740f48fe3cffae4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 19:09:56 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.4 → v0.14.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.4...v0.14.5) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ab31383..4983583 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: hooks: - id: codespell - repo: 'https://github.com/astral-sh/ruff-pre-commit' - rev: v0.14.4 + rev: v0.14.5 hooks: - id: ruff args: From 1e3be60eee712669d6cd9c97e515671abcd3c7bf Mon Sep 17 00:00:00 2001 From: Greg Pauloski <18683347+gpauloski@users.noreply.github.com> Date: Sat, 22 Nov 2025 10:48:08 -0800 Subject: [PATCH 2/2] Add Dask future type annotations --- proxystore_ex/plugins/distributed.py | 62 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/proxystore_ex/plugins/distributed.py b/proxystore_ex/plugins/distributed.py index 89c536a..f3ab6e1 100644 --- a/proxystore_ex/plugins/distributed.py +++ b/proxystore_ex/plugins/distributed.py @@ -6,6 +6,7 @@ import logging import warnings from collections.abc import Callable +from collections.abc import Collection from collections.abc import Iterable from collections.abc import Mapping from functools import partial @@ -148,25 +149,25 @@ def __init__( self._ps_store = ps_store self._ps_threshold = ps_threshold - def map( # type: ignore[no-untyped-def] + def map( self, - func, - *iterables, - key=None, - workers=None, - retries=None, - resources=None, - priority=0, - allow_other_workers=False, - fifo_timeout='100 ms', - actor=False, - actors=False, - pure=True, - batch_size=None, + func: Callable[..., T], + *iterables: Collection, # type: ignore[type-arg] + key: str | list[str] | None = None, + workers: str | Iterable[str] | None = None, + retries: int | None = None, + resources: dict[str, Any] | None = None, + priority: int = 0, + allow_other_workers: bool = False, + fifo_timeout: str = '100 ms', + actor: bool = False, + actors: bool = False, + pure: bool = True, + batch_size: int | None = None, proxy_args: bool = True, proxy_result: bool = True, - **kwargs, - ): + **kwargs: Any, + ) -> list[DaskDistributedFuture[T]]: """Map a function on a sequence of arguments. This has the same behavior as [`Client.map()`][distributed.Client.map] @@ -276,22 +277,23 @@ def map( # type: ignore[no-untyped-def] def submit( # type: ignore[no-untyped-def] self, - func, + func: Callable[..., T], *args, - key=None, - workers=None, - resources=None, - retries=None, - priority=0, - fifo_timeout='100 ms', - allow_other_workers=False, - actor=False, - actors=False, - pure=True, + key: str | None = None, + workers: str | Iterable[str] | None = None, + retries: int | None = None, + resources: dict[str, Any] | None = None, + priority: int = 0, + allow_other_workers: bool = False, + fifo_timeout: str = '100 ms', + actor: bool = False, + actors: bool = False, + pure: bool = True, + batch_size: int | None = None, proxy_args: bool = True, proxy_result: bool = True, - **kwargs, - ): + **kwargs: Any, + ) -> DaskDistributedFuture[T]: """Submit a function application to the scheduler. This has the same behavior as @@ -375,7 +377,7 @@ def submit( # type: ignore[no-untyped-def] def _evict_proxies_callback( - _future: DaskDistributedFuture, + _future: DaskDistributedFuture[Any], keys: Iterable[ConnectorKeyT], store: Store[Any], ) -> None: