yasmin_editor.editor_gui.transition_rules module

Pure transition-validation helpers for the editor canvas.

exception yasmin_editor.editor_gui.transition_rules.TransitionRuleError(message: str, *, title: str = 'Error')

Bases: ValueError

Raised when a requested editor transition is not valid.

yasmin_editor.editor_gui.transition_rules.get_available_transition_outcomes(container_model, source_outcomes: Sequence[str], used_outcomes: Collection[str] | None = None) list[str]

Return the outcomes that may still create a transition from a source state.

yasmin_editor.editor_gui.transition_rules.validate_drag_target(container_model, *, from_is_final_outcome: bool, to_is_final_outcome: bool) None

Validate whether a dragged transition endpoint pair is allowed.