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

Method _comment_resolve

box/box.py:887–895  ·  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

885 raise BoxError("Box is frozen")
886
887 def _comment_resolve(self, key):
888 """The stored key a key from YAML or the comment API refers to (camel_killer renames keys)."""
889 if dict.__contains__(self, key):
890 return key
891 if isinstance(key, str) and self.__camel_destructive():
892 converted = _camel_killer(key)
893 if dict.__contains__(self, converted):
894 return converted
895 return key
896
897 def _comment_owner(self, key):
898 """(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