MCPcopy Create free account
hub / github.com/cdgriffith/Box / _comment_resolve

Method _comment_resolve

box/box.py:881–889  ·  view source on GitHub ↗

The stored key a key from YAML or the comment API refers to (camel_killer renames keys).

(self, key)

Source from the content-addressed store, hash-verified

879 raise BoxError("Box is frozen")
880
881 def _comment_resolve(self, key):
882 """The stored key a key from YAML or the comment API refers to (camel_killer renames keys)."""
883 if dict.__contains__(self, key):
884 return key
885 if isinstance(key, str) and self.__camel_destructive():
886 converted = _camel_killer(key)
887 if dict.__contains__(self, converted):
888 return converted
889 return key
890
891 def _comment_owner(self, key):
892 """(container, key) that holds the comment for `key`, following box_dots paths."""

Callers 2

_comment_ownerMethod · 0.95
_resolve_keyFunction · 0.45

Calls 3

__camel_destructiveMethod · 0.95
_camel_killerFunction · 0.85
__contains__Method · 0.45

Tested by

no test coverage detected