tts_fresh.utils
Submodules
tts_fresh.utils.modal_bool
- class tts_fresh.utils.modal_bool.ModalBool(*values)
Bases:
EnumImplements a three-valued logic system consisting of YES, NO, and MAYBE states. This enum provides standard boolean-like operations such as AND, OR, and NOT, allowing for more nuanced conditional logic where certainty is not always guaranteed. It is particularly useful for validation rules that may have indeterminate results based on the provided sequence data.
- MAYBE = 1
- NO = 0
- YES = 2
- static of(b) ModalBool
Converts a standard boolean value or an existing ModalBool instance into a ModalBool type. This utility ensures type consistency by mapping True/False values to YES/NO while passing existing ModalBool states through unchanged. It serves as a constructor-like helper for normalizing inputs before performing logical operations.