MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / format_output

Function format_output

src/ifcedit/ifcedit/__main__.py:34–39  ·  view source on GitHub ↗
(data, fmt: str)

Source from the content-addressed store, hash-verified

32
33
34def format_output(data, fmt: str) -> str:
35 if fmt == "json":
36 return json.dumps(data, indent=2, ensure_ascii=False)
37 elif fmt == "text":
38 return _format_text(data)
39 return json.dumps(data, indent=2, ensure_ascii=False)
40
41
42def _format_text(data, indent: int = 0) -> str:

Callers 5

cmd_listFunction · 0.70
cmd_docsFunction · 0.70
cmd_runFunction · 0.70
cmd_foreachFunction · 0.70
cmd_quantifyFunction · 0.70

Calls 1

_format_textFunction · 0.70

Tested by

no test coverage detected