mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-06 08:35:21 +08:00
super() binds to the enclosing class's method resolution order, Python's C3 linearization, in which a common base follows every class deriving from it. The super() resolver walked the bases one by one, each through its whole ancestry, so with RadarrCalendarEntity(RadarrEntity, CalendarEntity) the first base reached Entity through CoordinatorEntity before CalendarEntity, which overrides it, was ever looked at. py_c3_linearize computes the order (memoized per lookup, capped in depth and length; -1 when the hierarchy has none), and super() takes the first class after the enclosing one that declares the member. A hierarchy without a C3 order keeps the base-by-base walk, as does the synthesized __init__ of an undeclared constructor. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>