MCPcopy Index your code
hub / github.com/RustPython/RustPython / _find_all_inheritors

Function _find_all_inheritors

scripts/update_lib/cmd_auto_mark.py:465–476  ·  view source on GitHub ↗

Find all classes that inherit *method_name* from *parent* (not overriding it).

(
    parent: str, method_name: str, class_bases: dict, class_methods: dict
)

Source from the content-addressed store, hash-verified

463
464
465def _find_all_inheritors(
466 parent: str, method_name: str, class_bases: dict, class_methods: dict
467) -> set[str]:
468 """Find all classes that inherit *method_name* from *parent* (not overriding it)."""
469 return {
470 cls
471 for cls in class_bases
472 if cls != parent
473 and method_name not in class_methods.get(cls, set())
474 and _find_method_definition(cls, method_name, class_bases, class_methods)
475 == parent
476 }
477
478
479def remove_expected_failures(

Callers 2

_consolidate_to_parentFunction · 0.85

Calls 3

setFunction · 0.85
_find_method_definitionFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected