From 635ec2d7bdfa5f7724dcff1d798cfd3e32379235 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:28:13 +0800 Subject: [PATCH] fix(python): report circular inheritance again: a class may list itself once as its own ancestor --- src/editor/navigation/inheritanceGraph.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor/navigation/inheritanceGraph.ts b/src/editor/navigation/inheritanceGraph.ts index adbcb4b33..6469a9dca 100644 --- a/src/editor/navigation/inheritanceGraph.ts +++ b/src/editor/navigation/inheritanceGraph.ts @@ -302,7 +302,8 @@ export async function ancestryResolution( cls: ClassInheritance, depth = 8, ): Promise { - const seen = new Set([declarationKey(cls)]); + // `cls` itself is not pre-seen: a cycle lists it once as its own ancestor. + const seen = new Set(); const out: AncestorNode[] = []; let firstUnresolvedDepth = Infinity; let level: ClassInheritance[] = [cls];