Skip to content

Commit 0d88110

Browse files
authored
Merge pull request #182 from proxystore/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 2905c4c + 1e3be60 commit 0d88110

2 files changed

Lines changed: 33 additions & 31 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
hooks:
1919
- id: codespell
2020
- repo: 'https://github.com/astral-sh/ruff-pre-commit'
21-
rev: v0.14.4
21+
rev: v0.14.5
2222
hooks:
2323
- id: ruff
2424
args:

proxystore_ex/plugins/distributed.py

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import logging
77
import warnings
88
from collections.abc import Callable
9+
from collections.abc import Collection
910
from collections.abc import Iterable
1011
from collections.abc import Mapping
1112
from functools import partial
@@ -148,25 +149,25 @@ def __init__(
148149
self._ps_store = ps_store
149150
self._ps_threshold = ps_threshold
150151

151-
def map( # type: ignore[no-untyped-def]
152+
def map(
152153
self,
153-
func,
154-
*iterables,
155-
key=None,
156-
workers=None,
157-
retries=None,
158-
resources=None,
159-
priority=0,
160-
allow_other_workers=False,
161-
fifo_timeout='100 ms',
162-
actor=False,
163-
actors=False,
164-
pure=True,
165-
batch_size=None,
154+
func: Callable[..., T],
155+
*iterables: Collection, # type: ignore[type-arg]
156+
key: str | list[str] | None = None,
157+
workers: str | Iterable[str] | None = None,
158+
retries: int | None = None,
159+
resources: dict[str, Any] | None = None,
160+
priority: int = 0,
161+
allow_other_workers: bool = False,
162+
fifo_timeout: str = '100 ms',
163+
actor: bool = False,
164+
actors: bool = False,
165+
pure: bool = True,
166+
batch_size: int | None = None,
166167
proxy_args: bool = True,
167168
proxy_result: bool = True,
168-
**kwargs,
169-
):
169+
**kwargs: Any,
170+
) -> list[DaskDistributedFuture[T]]:
170171
"""Map a function on a sequence of arguments.
171172
172173
This has the same behavior as [`Client.map()`][distributed.Client.map]
@@ -276,22 +277,23 @@ def map( # type: ignore[no-untyped-def]
276277

277278
def submit( # type: ignore[no-untyped-def]
278279
self,
279-
func,
280+
func: Callable[..., T],
280281
*args,
281-
key=None,
282-
workers=None,
283-
resources=None,
284-
retries=None,
285-
priority=0,
286-
fifo_timeout='100 ms',
287-
allow_other_workers=False,
288-
actor=False,
289-
actors=False,
290-
pure=True,
282+
key: str | None = None,
283+
workers: str | Iterable[str] | None = None,
284+
retries: int | None = None,
285+
resources: dict[str, Any] | None = None,
286+
priority: int = 0,
287+
allow_other_workers: bool = False,
288+
fifo_timeout: str = '100 ms',
289+
actor: bool = False,
290+
actors: bool = False,
291+
pure: bool = True,
292+
batch_size: int | None = None,
291293
proxy_args: bool = True,
292294
proxy_result: bool = True,
293-
**kwargs,
294-
):
295+
**kwargs: Any,
296+
) -> DaskDistributedFuture[T]:
295297
"""Submit a function application to the scheduler.
296298
297299
This has the same behavior as
@@ -375,7 +377,7 @@ def submit( # type: ignore[no-untyped-def]
375377

376378

377379
def _evict_proxies_callback(
378-
_future: DaskDistributedFuture,
380+
_future: DaskDistributedFuture[Any],
379381
keys: Iterable[ConnectorKeyT],
380382
store: Store[Any],
381383
) -> None:

0 commit comments

Comments
 (0)