|
7 | 7 |
|
8 | 8 |
|
9 | 9 | class Transition(object): |
10 | | - """ |
11 | | - A transition holds reference to the source and target state. |
| 10 | + """A transition holds reference to the source and target state. |
12 | 11 |
|
13 | 12 | Args: |
14 | | - source (State): The origin :ref:`State` of the transition. |
15 | | - target (State): The target :ref:`State` of the transition. |
| 13 | + source (State): The origin state of the transition. |
| 14 | + target (State): The target state of the transition. |
16 | 15 | event (Optional[Union[str, List[str]]]): List of designators of events that trigger this |
17 | | - transition. |
18 | | -
|
19 | | - Can be either a list of strings, or a space-separated string list of event |
| 16 | + transition. Can be either a list of strings, or a space-separated string list of event |
20 | 17 | descriptors. |
| 18 | + validators (Optional[Union[str, Callable, List[Callable]]]): The validation callbacks to |
| 19 | + be invoked before the transition is executed. |
| 20 | + cond (Optional[Union[str, Callable, List[Callable]]]): The condition callbacks to be |
| 21 | + invoked before the transition is executed that should evaluate to `True`. |
| 22 | + unless (Optional[Union[str, Callable, List[Callable]]]): The condition callbacks to be |
| 23 | + invoked if the `cond` is False before the transition is executed. |
| 24 | + on (Optional[Union[str, Callable, List[Callable]]]): The callbacks to be invoked |
| 25 | + when the transition is executed. |
| 26 | + before (Optional[Union[str, Callable, List[Callable]]]): The callbacks to be invoked |
| 27 | + before the transition is executed. |
| 28 | + after (Optional[Union[str, Callable, List[Callable]]]): The callbacks to be invoked |
| 29 | + after the transition is executed. |
21 | 30 | """ |
22 | 31 |
|
23 | 32 | def __init__( |
|
0 commit comments