@@ -413,9 +413,7 @@ def visit(self, terminal: Terminal, phases: FrozenSet[SinglePhaseKind]) -> bool:
413413 return self ._tracker .visit (terminal , phases )
414414
415415
416- def default_condition_step_type (step_type : CanActionItem ):
417- if step_type is None :
418- return False
416+ def default_condition_step_type (step_type : CanActionItem ) -> NetworkTraceStep .Type :
419417 if step_type == NetworkTraceActionType .ALL_STEPS :
420418 return NetworkTraceStep .Type .ALL
421419 elif step_type == NetworkTraceActionType .FIRST_STEP_ON_EQUIPMENT :
@@ -432,19 +430,4 @@ def compute_data_with_action_type(compute_data: ComputeData[T], action_type: Can
432430 current_step .data if next_path .traced_internally else compute_data .compute_next (current_step , current_context , next_path )
433431 )
434432 )
435- raise Exception (f'{ action_type .__class__ } : step doesnt match expected types' )
436-
437-
438- def with_paths_with_action_type (self , action_type : NetworkTraceActionType ) -> ComputeDataWithPaths [T ]:
439- if action_type == NetworkTraceActionType .ALL_STEPS :
440- return self
441- elif action_type == NetworkTraceActionType .FIRST_STEP_ON_EQUIPMENT :
442- return ComputeDataWithPaths (
443- lambda current_step , current_context , next_path , next_paths : (
444- current_step .data if next_path .traced_internally else self .compute_next (current_step , current_context , next_path , next_paths )
445- )
446- )
447- raise Exception ('step doesnt match expected types' )
448-
449-
450- ComputeDataWithPaths [T ].with_action_type = with_paths_with_action_type
433+ raise Exception (f'{ action_type .__name__ } : step doesnt match expected types' )
0 commit comments