MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / get_nested_key

Method get_nested_key

deeplabcut/gui/widgets.py:372–379  ·  view source on GitHub ↗
(cfg, keys)

Source from the content-addressed store, hash-verified

370
371 @staticmethod
372 def get_nested_key(cfg, keys):
373 temp = cfg
374 for key in keys[:-1]:
375 try:
376 temp = temp.setdefault(key, {})
377 except AttributeError: # Handle nested lists
378 temp = temp[int(key)]
379 return temp
380
381 def edit_value(self, item):
382 keys, value = self.walk_recursively_to_root(item)

Callers 2

set_valueMethod · 0.95
remove_keyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected