def is_set
import cswap-bend-cli@0.1.0.0/setwrite.bend as Setwriteimport Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/settings.bend as Settings
142# Is the key present in the raw file (an explicit default still counts)?
143def is_set(raw: Json.Json, sp: Settings.Spec) -> Bool:
144 match sp:
145 case Settings.Spec{section, key, kind, lo, hi, choices, dflt}:
146 has.in(Json.get(section, raw), key)