MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / normalize_bool_field

Function normalize_bool_field

main.py:104–107  ·  view source on GitHub ↗
(data: dict, key: str, default: bool)

Source from the content-addressed store, hash-verified

102
103
104def normalize_bool_field(data: dict, key: str, default: bool) -> bool:
105 if key not in data:
106 return default
107 return get_form_value(data, key).lower() in {"1", "true", "on", "yes"}
108
109
110def parse_int_field(

Callers 2

parse_setup_optionsFunction · 0.85
build_setup_pageFunction · 0.85

Calls 1

get_form_valueFunction · 0.85

Tested by

no test coverage detected