MCPcopy Index your code
hub / github.com/ComposioHQ/composio / normalize_example

Function normalize_example

python/scripts/generate-docs.py:244–254  ·  view source on GitHub ↗

Normalize a docstring example before wrapping it in an MDX code fence.

(example: str)

Source from the content-addressed store, hash-verified

242
243
244def normalize_example(example: str) -> str:
245 """Normalize a docstring example before wrapping it in an MDX code fence."""
246 normalized = textwrap.dedent(example).strip()
247 lines = normalized.splitlines()
248
249 if len(lines) >= 2 and lines[0].strip().startswith("```"):
250 closing_index = len(lines) - 1
251 if lines[closing_index].strip() == "```":
252 normalized = "\n".join(lines[1:closing_index]).strip()
253
254 return normalized
255
256
257def extract_class_info(

Callers 1

parse_docstringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…