Tri-state value: on, off or auto

Class Variable ON Undocumented
Class Variable OFF Undocumented
Class Variable AUTO Undocumented
Method __init__ Undocumented
Method __repr__ No summary
Method __nonzero__ No summary
Method state Get current state
Method is_auto Undocumented
Method is_on Undocumented
Method is_off Undocumented
Method do Run function if tristate is on or auto, only report a failure if tristate is on since failing is o.k. for autodetect.
Class Variable _VALID_NAMES Undocumented
Instance Variable _state Undocumented
ON =
Undocumented
(type: bool)
OFF =
Undocumented
(type: bool)
AUTO =
Undocumented
(type: int)
_VALID_NAMES =
Undocumented
(type: List[str])
def __init__(self, val):
Undocumented
_state =
Undocumented
def __repr__(self):
>>> Tristate('on').__repr__()
'on'
>>> Tristate(True).__repr__()
'on'
>>> Tristate(False).__repr__()
'off'
>>> Tristate('auto').__repr__()
'auto'
def __nonzero__(self):
>>> Tristate('on').__nonzero__()
True
>>> Tristate('auto').__nonzero__()
True
>>> Tristate('off').__nonzero__()
False
@property
def state(self):

Get current state

def is_auto(self):
Undocumented
def is_on(self):
Undocumented
def is_off(self):
Undocumented
def do(self, function, *args, **kwargs):

Run function if tristate is on or auto, only report a failure if tristate is on since failing is o.k. for autodetect.

API Documentation for git-buildpackage, generated by pydoctor at 2021-02-01 08:15:22.