From 77eb6800704052c4860f0a4aa40fc227cae8b569 Mon Sep 17 00:00:00 2001 From: 1597463007 Date: Fri, 4 Oct 2024 11:56:31 -0400 Subject: [PATCH] Fix linting errors Signed-off-by: 1597463007 --- pargraph/graph/decorators.py | 4 ++-- tests/test_graph_generation.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pargraph/graph/decorators.py b/pargraph/graph/decorators.py index 70671f5..7e5206a 100644 --- a/pargraph/graph/decorators.py +++ b/pargraph/graph/decorators.py @@ -167,7 +167,7 @@ def wrapper(*args, **kwargs) -> Union[Graph, GraphContext, Tuple[GraphContext, . default_value = bound_args.signature.parameters[name].default if default_value is inspect.Parameter.empty: continue - + const_id = f"_{uuid.uuid4().hex}" sub_graph.consts[ConstKey(key=const_id)] = Const.from_value(default_value) sub_graph.inputs[InputKey(key=name)] = ConstKey(key=const_id) @@ -283,7 +283,7 @@ def wrapper(*args, **kwargs) -> Union[Graph, GraphContext, Tuple[GraphContext, . const_id = f"_{uuid.uuid4().hex}" graph_result.consts[ConstKey(key=const_id)] = Const.from_value(default_value) graph_result.inputs[InputKey(key=name)] = ConstKey(key=const_id) - + return graph_result # Inject function call node into graph diff --git a/tests/test_graph_generation.py b/tests/test_graph_generation.py index cfbca04..85c57d6 100644 --- a/tests/test_graph_generation.py +++ b/tests/test_graph_generation.py @@ -270,7 +270,7 @@ def test_graph_default_argument(self): @graph def sample_graph(x: int, y: int = 1) -> int: return x + y - + self.assertEqual(self.engine.get(*sample_graph.to_graph().to_dask(x=2, y=3))[0], sample_graph(x=2, y=3)) def test_graph_default_argument_missing(self):