Commit 2806e3d
fix: handle TypeError in lookup_class_name for Diagram (#1072)
When inspect.getmembers() encounters modules with objects that have
non-standard __bases__ attributes (like _ClassNamespace from typing
internals), it raises TypeError. This caused dj.Diagram(schema) to
fail intermittently depending on what modules were imported.
Now catches TypeError in addition to ImportError, allowing the search
to continue by skipping problematic modules.
Fixes #1072
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent c1b36f0 commit 2806e3d
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1306 | 1306 | | |
1307 | 1307 | | |
1308 | 1308 | | |
1309 | | - | |
1310 | | - | |
| 1309 | + | |
| 1310 | + | |
1311 | 1311 | | |
1312 | 1312 | | |
1313 | 1313 | | |
| |||
0 commit comments