MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / TriBoolean

Function TriBoolean

src/commoncode/datautils.py:87–111  ·  view source on GitHub ↗

Return a tri-boolean attribute with possible values of None, True and False.

(
    default=None,
    validator=None,
    repr=False,
    eq=True,
    order=True,  # NOQA
    converter=None,
    label=None,
    help=None,
)

Source from the content-addressed store, hash-verified

85
86
87def TriBoolean(
88 default=None,
89 validator=None,
90 repr=False,
91 eq=True,
92 order=True, # NOQA
93 converter=None,
94 label=None,
95 help=None,
96): # NOQA
97 """
98 Return a tri-boolean attribute with possible values of None, True and False.
99 """
100 return attribute(
101 default=default,
102 validator=validator,
103 repr=repr,
104 eq=eq,
105 order=order,
106 init=True,
107 type=bool,
108 converter=converter,
109 help=help,
110 label=label,
111 )
112
113
114def String(

Callers

nothing calls this directly

Calls 1

attributeFunction · 0.70

Tested by

no test coverage detected