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

Method set_comment

box/box.py:935–941  ·  view source on GitHub ↗

Attach a comment to an existing key. `position` is "eol" (default, on the key's line) or "before" (lines above the key, may contain newlines). ``key=None`` sets a document comment, position "start" (default) or "end". An empty `text` removes the comment at that position.

(self, key: Any, text: Any, position: str | None = None)

Source from the content-addressed store, hash-verified

933 return _comments.get_comment(self, key)
934
935 def set_comment(self, key: Any, text: Any, position: str | None = None) -> None:
936 """
937 Attach a comment to an existing key. `position` is "eol" (default, on the key's line) or
938 "before" (lines above the key, may contain newlines). ``key=None`` sets a document comment,
939 position "start" (default) or "end". An empty `text` removes the comment at that position.
940 """
941 _comments.set_comment(self, key, text, position)
942
943 def del_comment(self, key: Any = None) -> None:
944 """Remove every comment of `key` (``None``: the document comments)."""

Calls

no outgoing calls