Skip to content

Commit 3bd5be0

Browse files
authored
docs: Improving the final state repr, and fixing the unless repr (negating condition) (#304)
1 parent 057b53b commit 3bd5be0

15 files changed

Lines changed: 339 additions & 331 deletions

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,7 @@ target/
7171
*.sublime*
7272
.idea/
7373
.vscode/
74+
75+
# Sphinx-galery
76+
docs/auto_examples/sg_execution_times.*
77+
docs/auto_examples/*.pickle

docs/actions.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,14 @@ For each event, you can register `before_<event>` and `after_<event>`
4545

4646
(validators-and-guards)=
4747

48-
## Validators and Guards
48+
## Other callbacks
4949

50+
In addition to {ref}`actions`, you can specify {ref}`validators-and-guards` that are checked
51+
before an transition is started. They are meant to stop a transition to occur.
5052

51-
Validations and Guards are checked before an transition is started. They are meant to stop a
52-
transition to occur.
53-
54-
The main difference, is that validators raise exceptions to stop the flow, and Guards act like
55-
predicates that should resolve for ``boolean``.
56-
57-
There are two variations of Guard clauses available:
58-
59-
- `conditions` : Should evaluate to `True`.
60-
61-
- `unless` : Should evaluate to `False`.
62-
53+
```{seealso}
54+
See {ref}`guards` and {ref}`validators`.
55+
```
6356

6457

6558
## Ordering
-1.27 KB
Binary file not shown.

docs/auto_examples/images/sphx_glr_all_actions_machine_001.svg

Lines changed: 18 additions & 17 deletions
Loading

docs/auto_examples/images/sphx_glr_order_control_machine_001.svg

Lines changed: 36 additions & 35 deletions
Loading

0 commit comments

Comments
 (0)