MCPcopy
hub / github.com/PyGithub/PyGithub / merge_paths

Function merge_paths

scripts/openapi.py:348–360  ·  view source on GitHub ↗
(paths: list[dict[str, Any]])

Source from the content-addressed store, hash-verified

346
347
348def merge_paths(paths: list[dict[str, Any]]) -> dict[str, Any]:
349 merged_paths = {}
350 for path_dict in paths:
351 for path, verbs in path_dict.items():
352 for verb, methods in verbs.items():
353 if path not in merged_paths:
354 merged_paths[path] = {}
355 if verb not in merged_paths[path]:
356 merged_paths[path][verb] = {}
357 if "methods" not in merged_paths[path][verb]:
358 merged_paths[path][verb]["methods"] = []
359 merged_paths[path][verb]["methods"].extend(methods.get("methods", []))
360 return merged_paths
361
362
363class CstMethods(abc.ABC):

Callers 1

indexMethod · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…