fix doc for cmd_runner_fmt.as_bool() (#8971)

pull/8983/head
Alexei Znamensky 2024-10-04 01:19:13 +13:00 committed by GitHub
parent c4e2b73193
commit 7fc7af306c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 1 deletions

View File

@ -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 |