Skip to content

Commit

Permalink
Hint graph creator
Browse files Browse the repository at this point in the history
Incompletely for the creator, but I'm having trouble getting mypy happy with hinting args and kwargs here.

Signed-off-by: liamhuber <[email protected]>
  • Loading branch information
liamhuber committed Jan 17, 2025
1 parent 8907842 commit fcb341a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyiron_workflow/nodes/macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ def _setup_node(self) -> None:

@staticmethod
@abstractmethod
def graph_creator(self, *args, **kwargs) -> Callable:
def graph_creator(
self: Macro, *args, **kwargs
) -> HasChannel | tuple[HasChannel, ...] | None:
"""Build the graph the node will run."""

@classmethod
Expand Down Expand Up @@ -538,7 +540,7 @@ def decorator(graph_creator):


def macro_node(
graph_creator: Callable,
graph_creator: Callable[..., HasChannel | tuple[HasChannel, ...] | None],
*node_args,
output_labels: str | tuple[str, ...] | None = None,
validate_output_labels: bool = True,
Expand Down

0 comments on commit fcb341a

Please sign in to comment.