MCPcopy Index your code
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / recurse

Function recurse

dzoedepth/utils/config.py:258–266  ·  view source on GitHub ↗
(inp)

Source from the content-addressed store, hash-verified

256
257def flatten(config, except_keys=('bin_conf')):
258 def recurse(inp):
259 if isinstance(inp, dict):
260 for key, value in inp.items():
261 if key in except_keys:
262 yield (key, value)
263 if isinstance(value, dict):
264 yield from recurse(value)
265 else:
266 yield (key, value)
267
268 return dict(list(recurse(config)))
269

Callers 1

flattenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected