Skip to content

Commit e6005c1

Browse files
committed
doc(plan) typings & docs
1 parent dad310f commit e6005c1

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

graphtik/planning.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,12 @@ class Network(Plottable):
383383
384384
.. attribute:: needs
385385
386-
the "base", all data-nodes that are not produced by some operation
386+
the "base", all data-nodes that are not produced by some operation,
387+
decided on construction.
387388
.. attribute:: provides
388389
389-
the "base", all data-nodes produced by some operation
390+
the "base", all data-nodes produced by some operation.
391+
decided on construction.
390392
"""
391393

392394
def __init__(self, *operations, graph=None):
@@ -723,7 +725,8 @@ def _build_execution_steps(
723725
The original dag, pruned; not broken.
724726
:param sorted_nodes:
725727
an :class:`~boltons:boltons.setutils.IndexedSet` with all graph nodes
726-
topo-sorted (including pruned ones)
728+
topo-sorted (including pruned ones) by execution order & operation-insertion
729+
to break ties (see :func:`_topo_sort_nodes()`).
727730
:param inputs:
728731
Not used(!), useless inputs will be evicted when the solution is created.
729732
:param outputs:
@@ -847,8 +850,15 @@ def add_eviction(dep):
847850

848851
return list(steps)
849852

850-
def _deps_tuplized(self, deps, arg_name):
851-
"""Stabilize None, ``UNSET`` or string/list-of-strings deps in `graph`."""
853+
def _deps_tuplized(
854+
self, deps, arg_name
855+
) -> Tuple[Optional[Tuple[str, ...]], Optional[Tuple[str, ...]]]:
856+
"""
857+
Stabilize None or string/list-of-strings, drop names out of graph.
858+
859+
:return:
860+
a 2-tuple (stable-deps, deps-in-graph) or ``(None, None)``
861+
"""
852862
if deps is None:
853863
return None, None
854864

0 commit comments

Comments
 (0)