MCPcopy Create free account
hub / github.com/BUPT-GAMMA/MASFactory / _format_code

Method _format_code

applications/chatdev_lite/chatdev/codes.py:66–74  ·  view source on GitHub ↗

Formats code by removing empty lines. Args: code: Raw code content Returns: formatted code

(self, code)

Source from the content-addressed store, hash-verified

64 process_code_item(generated_content)
65
66 def _format_code(self, code):
67 """
68 Formats code by removing empty lines.
69 Args:
70 code: Raw code content
71 Returns:
72 formatted code
73 """
74 return "\n".join([line for line in code.split("\n") if len(line.strip()) > 0])
75
76 def _update_codes(self, generated_content):
77 """

Callers 2

process_code_itemMethod · 0.95
_load_from_hardwareMethod · 0.95

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected