Skip to content

Commit cd0dff3

Browse files
committed
refact(net): minor rpeserve inputs order
1 parent 4f22e7f commit cd0dff3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

graphtik/network.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,14 +668,16 @@ def prune(
668668
inputs = iset(_yield_datanodes(dag)) - outputs
669669
else:
670670
# Ignore `inputs` not in the graph.
671-
inputs = dag.nodes & inputs
671+
inputs = iset(inputs) & dag.nodes
672672

673673
## Scream on unknown `outputs`.
674674
#
675675
if outputs:
676676
unknown_outputs = iset(outputs) - dag.nodes
677677
if unknown_outputs:
678-
raise ValueError(f"Unknown output nodes: {list(unknown_outputs)}")
678+
raise ValueError(
679+
f"Unknown output nodes: {list(unknown_outputs)}\n {self}"
680+
)
679681

680682
assert inputs is not None and not isinstance(inputs, str)
681683
# but outputs may still be null.

0 commit comments

Comments
 (0)