Skip to content

Commit 1a6b067

Browse files
committed
renamed Outputs to TaskOutputs
1 parent 4a8c42d commit 1a6b067

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

pydra/design/base.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
if ty.TYPE_CHECKING:
29-
from pydra.engine.specs import TaskSpec, Outputs
29+
from pydra.engine.specs import TaskSpec, TaskOutputs
3030
from pydra.engine.core import Task
3131

3232
__all__ = [
@@ -351,7 +351,7 @@ def get_fields(klass, field_type, auto_attribs, helps) -> dict[str, Field]:
351351

352352
def make_task_spec(
353353
spec_type: type["TaskSpec"],
354-
out_type: type["Outputs"],
354+
out_type: type["TaskOutputs"],
355355
task_type: type["Task"],
356356
inputs: dict[str, Arg],
357357
outputs: dict[str, Out],
@@ -467,11 +467,11 @@ def make_task_spec(
467467

468468

469469
def make_outputs_spec(
470-
spec_type: type["Outputs"],
470+
spec_type: type["TaskOutputs"],
471471
outputs: dict[str, Out],
472472
bases: ty.Sequence[type],
473473
spec_name: str,
474-
) -> type["Outputs"]:
474+
) -> type["TaskOutputs"]:
475475
"""Create an outputs specification class and its outputs specification class from the
476476
output fields provided to the decorator/function.
477477
@@ -492,10 +492,10 @@ def make_outputs_spec(
492492
klass : type
493493
The class created using the attrs package
494494
"""
495-
from pydra.engine.specs import Outputs
495+
from pydra.engine.specs import TaskOutputs
496496

497497
if not any(issubclass(b, spec_type) for b in bases):
498-
if out_spec_bases := [b for b in bases if issubclass(b, Outputs)]:
498+
if out_spec_bases := [b for b in bases if issubclass(b, TaskOutputs)]:
499499
raise ValueError(
500500
f"Cannot make {spec_type} output spec from {out_spec_bases} bases"
501501
)

pydra/design/workflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
if ty.TYPE_CHECKING:
1717
from pydra.engine.workflow.base import Workflow
18-
from pydra.engine.specs import TaskSpec, Outputs, WorkflowSpec
18+
from pydra.engine.specs import TaskSpec, TaskOutputs, WorkflowSpec
1919

2020

2121
__all__ = ["define", "add", "this", "arg", "out"]
@@ -205,7 +205,7 @@ def this() -> "Workflow":
205205
return Workflow.under_construction
206206

207207

208-
OutputsType = ty.TypeVar("OutputsType", bound="Outputs")
208+
OutputsType = ty.TypeVar("OutputsType", bound="TaskOutputs")
209209

210210

211211
def add(task_spec: "TaskSpec[OutputsType]", name: str = None) -> OutputsType:

pydra/engine/specs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def is_set(value: ty.Any) -> bool:
4040
return value not in (attrs.NOTHING, EMPTY)
4141

4242

43-
class Outputs:
43+
class TaskOutputs:
4444
"""Base class for all output specifications"""
4545

4646
RESERVED_FIELD_NAMES = ("inputs", "split", "combine")
@@ -167,7 +167,7 @@ def __getitem__(self, name: str) -> ty.Any:
167167
raise KeyError(f"{self} doesn't have an attribute {name}") from None
168168

169169

170-
OutputsType = ty.TypeVar("OutputType", bound=Outputs)
170+
OutputsType = ty.TypeVar("OutputType", bound=TaskOutputs)
171171

172172

173173
class TaskSpec(ty.Generic[OutputsType]):
@@ -453,7 +453,7 @@ class RuntimeSpec:
453453
network: bool = False
454454

455455

456-
class PythonOutputs(Outputs):
456+
class PythonOutputs(TaskOutputs):
457457
pass
458458

459459

@@ -464,7 +464,7 @@ class PythonSpec(TaskSpec[PythonOutputsType]):
464464
pass
465465

466466

467-
class WorkflowOutputs(Outputs):
467+
class WorkflowOutputs(TaskOutputs):
468468
pass
469469

470470

@@ -480,7 +480,7 @@ class WorkflowSpec(TaskSpec[WorkflowOutputsType]):
480480
STDERR_HELP = """The standard error stream produced by the command."""
481481

482482

483-
class ShellOutputs(Outputs):
483+
class ShellOutputs(TaskOutputs):
484484
"""Output specification of a generic shell process."""
485485

486486
return_code: int = shell.out(help_string=RETURN_CODE_HELP)

pydra/engine/workflow/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
from typing_extensions import Self
55
import attrs
66
from pydra.engine.helpers import list_fields, attrs_values, is_lazy
7-
from pydra.engine.specs import TaskSpec, Outputs, WorkflowOutputs
7+
from pydra.engine.specs import TaskSpec, TaskOutputs, WorkflowOutputs
88
from .lazy import LazyInField
99
from pydra.utils.hash import hash_function
1010
from pydra.utils.typing import TypeParser, StateArray
1111
from .node import Node
1212

1313

14-
OutputsType = ty.TypeVar("OutputType", bound=Outputs)
14+
OutputsType = ty.TypeVar("OutputType", bound=TaskOutputs)
1515
WorkflowOutputsType = ty.TypeVar("OutputType", bound=WorkflowOutputs)
1616

1717

pydra/engine/workflow/node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import attrs
66
from pydra.utils.typing import TypeParser, StateArray
77
from . import lazy
8-
from ..specs import TaskSpec, Outputs, WorkflowSpec
8+
from ..specs import TaskSpec, TaskOutputs, WorkflowSpec
99
from ..task import Task
1010
from ..helpers import ensure_list, attrs_values, is_lazy, load_result, create_checksum
1111
from pydra.utils.hash import hash_function
@@ -16,7 +16,7 @@
1616
from .base import Workflow
1717

1818

19-
OutputType = ty.TypeVar("OutputType", bound=Outputs)
19+
OutputType = ty.TypeVar("OutputType", bound=TaskOutputs)
2020
Splitter = ty.Union[str, ty.Tuple[str, ...]]
2121

2222
_not_set = Enum("_not_set", "NOT_SET")

0 commit comments

Comments
 (0)