MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / _flatten_pages

Function _flatten_pages

scripts/docs/prefix_version_paths.py:260–274  ·  view source on GitHub ↗
(node: Any)

Source from the content-addressed store, hash-verified

258
259
260def _flatten_pages(node: Any) -> list[str]:
261 out: list[str] = []
262
263 def visit(n: Any) -> None:
264 if isinstance(n, str):
265 out.append(n)
266 elif isinstance(n, list):
267 for x in n:
268 visit(x)
269 elif isinstance(n, dict):
270 for v in n.values():
271 visit(v)
272
273 visit(node)
274 return out
275
276
277def _update_redirects(data: dict, default_version: str) -> int:

Callers 1

_migrate_language_blockFunction · 0.85

Calls 1

visitFunction · 0.85

Tested by

no test coverage detected