Skip to content

Commit 394b867

Browse files
committed
Extract full canonical paths for base classes
1 parent 693056e commit 394b867

3 files changed

Lines changed: 7254 additions & 3646 deletions

File tree

‎scripts/extract-api.py‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,20 @@ def _extract_class(self, cls: griffe.Class) -> dict | None:
471471
"parameters": [],
472472
}
473473

474-
# Extract bases safely
474+
# Extract bases with full canonical paths
475475
try:
476476
if cls.bases:
477-
class_data["bases"] = [str(base) for base in cls.bases]
477+
bases = []
478+
for base in cls.bases:
479+
try:
480+
# Try to get the resolved canonical path
481+
if hasattr(base, 'canonical_path') and base.canonical_path:
482+
bases.append(str(base.canonical_path))
483+
else:
484+
bases.append(str(base))
485+
except Exception:
486+
bases.append(str(base))
487+
class_data["bases"] = bases
478488
except Exception:
479489
pass
480490

‎src/lib/api/generated/index.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Re-run 'npm run extract' to update
33

44
import pathsimData from './pathsim.json';
5-
import chemData from './chem.json';
65

76
export interface APIParameter {
87
name: string;
@@ -66,7 +65,6 @@ export interface APIPackage {
6665

6766
export const apiData: Record<string, APIPackage> = {
6867
pathsim: pathsimData as APIPackage,
69-
chem: chemData as APIPackage,
7068
};
7169

7270
export default apiData;

0 commit comments

Comments
 (0)