From a633d4c28b1e85a307929414b0e07fe7d93e9597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20S=C3=B8ndergaard?= Date: Thu, 14 May 2020 12:09:25 +0200 Subject: [PATCH] Docstring for Graph.subset() --- src/gwf/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gwf/core.py b/src/gwf/core.py index 2bdb2ec8..700af972 100644 --- a/src/gwf/core.py +++ b/src/gwf/core.py @@ -436,6 +436,11 @@ def dfs_inner(node): return path def subset(self, endpoints): + """Subset a graph given an iterable of endpoints. + + This will return a new, potentially disjoint graph with the given + endpoints and all of their dependencies. + """ targets = set() for target in endpoints: for dep in self.dfs(target):