File tree Expand file tree Collapse file tree
plugboard-schemas/plugboard_schemas Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111from ._common import PlugboardBaseModel
1212from ._graph import simple_cycles
1313from ._validation import (
14- ValidationError ,
1514 validate_all_inputs_connected ,
1615 validate_input_events ,
1716 validate_no_unresolved_cycles ,
9291 "TuneArgsDict" ,
9392 "TuneArgsSpec" ,
9493 "TuneSpec" ,
95- "ValidationError" ,
9694 "simple_cycles" ,
9795 "validate_all_inputs_connected" ,
9896 "validate_input_events" ,
Original file line number Diff line number Diff line change 1919 from .connector import ConnectorSpec
2020
2121
22- class ValidationError (Exception ):
23- """Raised when a process specification fails validation."""
24-
25- pass
26-
27-
2822def _build_component_graph (
2923 connectors : list [ConnectorSpec ],
3024) -> dict [str , set [str ]]:
@@ -62,13 +56,12 @@ def _get_edges_in_cycle(
6256 List of connector specs that are part of the cycle.
6357 """
6458 cycle_edges : list [ConnectorSpec ] = []
65- cycle_set = set (cycle )
6659 for i , node in enumerate (cycle ):
6760 next_node = cycle [(i + 1 ) % len (cycle )]
6861 for conn in connectors :
6962 if conn .source .entity == node and conn .target .entity == next_node :
7063 cycle_edges .append (conn )
71- return [ c for c in cycle_edges if c . source . entity in cycle_set and c . target . entity in cycle_set ]
64+ return cycle_edges
7265
7366
7467def validate_all_inputs_connected (
You can’t perform that action at this time.
0 commit comments