Skip to content

Commit

Permalink
Add type annotations to DependencyResolver fields (#3458)
Browse files Browse the repository at this point in the history
  • Loading branch information
benclifford authored May 27, 2024
1 parent 5b21ab1 commit a2ea9cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parsl/dataflow/dependency_resolvers.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from concurrent.futures import Future
from dataclasses import dataclass
from functools import singledispatch
from typing import Callable
from typing import Callable, Sequence


@dataclass
class DependencyResolver:
"""A DependencyResolver describes how app dependencies can be resolved.
It is specified as two functions: `traverse_to_gather` which turns an
app parameter into a list of futures which must be waited for before
app parameter into a sequence of futures which must be waited for before
the task can be executed (for example, in the case of
`DEEP_DEPENDENCY_RESOLVER` this traverses structures such as lists to
find every contained ``Future``), and `traverse_to_unwrap` which turns an
Expand All @@ -20,8 +20,8 @@ class DependencyResolver:
By default, Parsl will use `SHALLOW_DEPENDENCY_RESOLVER` which only
resolves Futures passed directly as arguments.
"""
traverse_to_gather: Callable
traverse_to_unwrap: Callable
traverse_to_gather: Callable[[object], Sequence[Future]]
traverse_to_unwrap: Callable[[object], object]


@singledispatch
Expand Down

0 comments on commit a2ea9cc

Please sign in to comment.