Clean description text by stripping whitespace and normalizing newlines.
(self, description)
| 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 | |
| 309 | def load_flow_file(file_path: str) -> Dict[str, Any]: |
no outgoing calls
no test coverage detected