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

Method get_comment

box/box_list.py:364–370  ·  view source on GitHub ↗

Return the comments of `key` as ``{"before": text, "eol": text}`` (a position without a comment is left out), or None. ``key=None`` returns the document comments ``{"start": ..., "end": ...}``. With box_dots, `key` can be a dotted path.

(self, key: Any = None)

Source from the content-addressed store, hash-verified

362 # ---- Comments (#184): kept outside the data, written by to_yaml with ruamel.yaml ----
363
364 def get_comment(self, key: Any = None) -> dict | None:
365 """
366 Return the comments of `key` as ``{"before": text, "eol": text}`` (a position without a comment
367 is left out), or None. ``key=None`` returns the document comments ``{"start": ..., "end": ...}``.
368 With box_dots, `key` can be a dotted path.
369 """
370 return _comments.get_comment(self, key)
371
372 def set_comment(self, key: Any, text: Any, position: str | None = None) -> None:
373 """

Calls

no outgoing calls