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

Method set_comment

box/box.py:929–935  ·  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

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

Calls

no outgoing calls