MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / _clean_description

Method _clean_description

src/data/flow_format.py:294–306  ·  view source on GitHub ↗

Clean description text by stripping whitespace and normalizing newlines.

(self, description)

Source from the content-addressed store, hash-verified

292 return "\n\n".join(paragraphs)
293
294 def _clean_description(self, description):
295 """Clean description text by stripping whitespace and normalizing newlines."""
296 if not description:
297 return ""
298
299 # Strip leading/trailing whitespace
300 cleaned = description.strip()
301
302 # Normalize multiple consecutive newlines to at most two (paragraph break)
303 import re
304 cleaned = re.sub(r'\n\s*\n\s*\n+', '\n\n', cleaned)
305
306 return cleaned
307
308
309def load_flow_file(file_path: str) -> Dict[str, Any]:

Callers 2

_node_to_flowMethod · 0.95
markdown_to_dataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected