File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -679,8 +679,8 @@ def prune(
679679 f"Unknown output nodes: { list (unknown_outputs )} \n { self } "
680680 )
681681
682- assert inputs is not None and not isinstance (inputs , str )
683- # but outputs may still be null.
682+ assert isinstance (inputs , abc . Collection )
683+ assert outputs is None or isinstance ( outputs , abc . Collection )
684684
685685 broken_dag = dag .copy () # preserve net's graph
686686 broken_edges = set () # unordered, not iterated
@@ -720,8 +720,8 @@ def prune(
720720 )
721721
722722 assert all (_yield_datanodes (pruned_dag )), pruned_dag
723- assert inputs is not None and not isinstance (inputs , str )
724- assert outputs is not None and not isinstance (outputs , str )
723+ assert inputs is not None or isinstance (inputs , abc . Collection )
724+ assert outputs is not None or isinstance (outputs , abc . Collection )
725725
726726 return pruned_dag , broken_edges , tuple (inputs ), tuple (outputs )
727727
You can’t perform that action at this time.
0 commit comments