MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / _extract_python_code

Method _extract_python_code

KVCOMM/agents/final_decision.py:57–64  ·  view source on GitHub ↗

Extract pure python code from a fenced block.

(text: str)

Source from the content-addressed store, hash-verified

55
56 @staticmethod
57 def _extract_python_code(text: str) -> str:
58 """Extract pure python code from a fenced block."""
59 if not FinalWriteCode._is_python_code_block(text):
60 return text
61 content = text.strip()[len("```python") :].strip()
62 if content.endswith("```"):
63 content = content[:-3].strip()
64 return content
65
66 def _summarize_agent_outputs(
67 self,

Callers 1

Calls 1

_is_python_code_blockMethod · 0.80

Tested by

no test coverage detected