From bdf1bf18dc02da6ae1dfd6dd8242f56602c6ab04 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Fri, 6 Dec 2013 19:52:52 -0800 Subject: [PATCH] Don't forget to return self To retain the functionality where we can chain function calls to add, link we need to return the object we are acting on (instead of none). Change-Id: Iadf0f9d3a21b6d079c1edd29063196180f5222ed --- taskflow/patterns/graph_flow.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/taskflow/patterns/graph_flow.py b/taskflow/patterns/graph_flow.py index db56ec6d..56c77b5b 100644 --- a/taskflow/patterns/graph_flow.py +++ b/taskflow/patterns/graph_flow.py @@ -204,12 +204,14 @@ class TargetedFlow(Flow): super(TargetedFlow, self).add(*items) # reset cached subgraph, in case it was affected self._subgraph = None + return self def link(self, u, v): """Link existing node u as a runtime dependency of existing node v.""" super(TargetedFlow, self).link(u, v) # reset cached subgraph, in case it was affected self._subgraph = None + return self @property def graph(self):