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

Method set_comment

box/box_list.py:372–378  ·  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

370 return _comments.get_comment(self, key)
371
372 def set_comment(self, key: Any, text: Any, position: str | None = None) -> None:
373 """
374 Attach a comment to an existing key. `position` is "eol" (default, on the key's line) or
375 "before" (lines above the key, may contain newlines). ``key=None`` sets a document comment,
376 position "start" (default) or "end". An empty `text` removes the comment at that position.
377 """
378 _comments.set_comment(self, key, text, position)
379
380 def del_comment(self, key: Any = None) -> None:
381 """Remove every comment of `key` (``None``: the document comments)."""

Calls

no outgoing calls