(obj, position)
| 324 | |
| 325 | |
| 326 | def _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 | |
| 333 | def dump_yaml(obj, plain, filename=None, encoding: str = "utf-8", errors: str = "strict", **yaml_kwargs): |
no test coverage detected