kamihi.questions.bool
⚓︎
Generic boolean reusable question.
License
MIT
Classes:
| Name | Description |
|---|---|
Bool |
Generic boolean reusable question. |
Bool
⚓︎
Bool(
text: str,
error_text: str = None,
true_values: set[str] = None,
false_values: set[str] = None,
)
Bases: Question
Generic boolean reusable question.
Initialize an instance of the Bool question.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
The text of the question. |
required |
|
str
|
The error text to display for invalid responses. Defaults to a value from settings. |
None
|
|
set[str]
|
A set of strings that represent true values. Defaults to a value from settings. |
None
|
|
set[str]
|
A set of strings that represent false values. Defaults to a value from settings. |
None
|
Source code in src/kamihi/questions/bool.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |