MCPcopy
hub / github.com/PyGithub/PyGithub / extend_inheritance

Method extend_inheritance

scripts/openapi.py:2034–2047  ·  view source on GitHub ↗
(classes: dict[str, Any])

Source from the content-addressed store, hash-verified

2032
2033 @staticmethod
2034 def extend_inheritance(classes: dict[str, Any]) -> bool:
2035 extended_classes = {}
2036 updated = False
2037
2038 for name, cls in classes.items():
2039 orig_inheritance = cls.get("inheritance", set()).union(set(cls.get("bases", [])))
2040 inheritance = orig_inheritance.union(
2041 ancestor for base in cls.get("bases", []) for ancestor in classes.get(base, {}).get("inheritance", [])
2042 )
2043 cls["inheritance"] = inheritance
2044 extended_classes[name] = cls
2045 updated = updated or inheritance != orig_inheritance
2046
2047 return updated
2048
2049 @classmethod
2050 def propagate_ids(cls, classes: dict[str, Any]) -> bool:

Callers 1

indexMethod · 0.95

Calls 1

getMethod · 0.80

Tested by

no test coverage detected