mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-09 04:00:31 -07:00
[PR #8971/7fc7af30 backport][stable-9] fix doc for cmd_runner_fmt.as_bool() (#8974)
fix doc for cmd_runner_fmt.as_bool() (#8971)
(cherry picked from commit 7fc7af306c
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
76b6c8e184
commit
89d33bbd7b
1 changed files with 13 additions and 1 deletions
|
@ -186,8 +186,20 @@ In these descriptions ``value`` refers to the single parameter passed to the for
|
||||||
+------------+--------------------+
|
+------------+--------------------+
|
||||||
| ``False`` | ``[]`` |
|
| ``False`` | ``[]`` |
|
||||||
+------------+--------------------+
|
+------------+--------------------+
|
||||||
- Creation (two args):
|
- Creation (two args, ``None`` treated as ``False``):
|
||||||
``cmd_runner_fmt.as_bool("--relax", "--dont-do-it")``
|
``cmd_runner_fmt.as_bool("--relax", "--dont-do-it")``
|
||||||
|
- Examples:
|
||||||
|
+------------+----------------------+
|
||||||
|
| Value | Outcome |
|
||||||
|
+============+======================+
|
||||||
|
| ``True`` | ``["--relax"]`` |
|
||||||
|
+------------+----------------------+
|
||||||
|
| ``False`` | ``["--dont-do-it"]`` |
|
||||||
|
+------------+----------------------+
|
||||||
|
| | ``["--dont-do-it"]`` |
|
||||||
|
+------------+----------------------+
|
||||||
|
- Creation (two args, ``None`` is ignored):
|
||||||
|
``cmd_runner_fmt.as_bool("--relax", "--dont-do-it", ignore_none=True)``
|
||||||
- Examples:
|
- Examples:
|
||||||
+------------+----------------------+
|
+------------+----------------------+
|
||||||
| Value | Outcome |
|
| Value | Outcome |
|
||||||
|
|
Loading…
Add table
Reference in a new issue