Files
codebase-memory-mcp/internal
Martin Vogel 7fa5f89374 fix(python-lsp): resolve super() through the C3 method resolution order
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>
2026-10-18 22:57:12 +02:00
..