bundles / traitlets latest / traitlets / config / application / boolean_flag
function
traitlets.config.application:boolean_flag
Signature
def boolean_flag(name: str, configurable: str, set_help: str = '', unset_help: str = '') → StrDictSummary
Helper for building basic --trait, --no-trait flags.
Parameters
name: strThe name of the flag.
configurable: strThe 'Class.trait' string of the trait to be set/unset with the flag
set_help: unicodehelp string for --name flag
unset_help: unicodehelp string for --no-name flag
Returns
cfg: dictA dict with two keys: 'name', and 'no-name', for setting and unsetting the trait, respectively.
Aliases
traitlets.config.boolean_flag