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

Function _document_lines

box/comments.py:326–330  ·  view source on GitHub ↗
(obj, position)

Source from the content-addressed store, hash-verified

324
325
326def _document_lines(obj, position) -> str:
327 document = obj._comment_document(create=False) if hasattr(obj, "_comment_document") else None
328 if not document or not document.get(position):
329 return ""
330 return "".join((f"# {line}" if line else "") + "\n" for line in document[position])
331
332
333def dump_yaml(obj, plain, filename=None, encoding: str = "utf-8", errors: str = "strict", **yaml_kwargs):

Callers 1

dump_yamlFunction · 0.85

Calls 2

getMethod · 0.80
_comment_documentMethod · 0.45

Tested by

no test coverage detected