def is_set

cswap-bend-cli@0.1.0.0 · setwrite.bend:142

import cswap-bend-cli@0.1.0.0/setwrite.bend as Setwrite
import 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)

Uses (5)

Used by (1)