Commit f1c0725
fix: use self.nodes() in Diagram.__init__ to populate nodes_to_show
The custom __iter__ only yields from nodes_to_show, creating a
chicken-and-egg problem: when __init__ used 'for node in self:'
to populate nodes_to_show for a schema source, nodes_to_show was
still empty so __iter__ yielded nothing, leaving nodes_to_show empty.
Fix: replace 'for node in self:' with 'for node in self.nodes()'
which calls the inherited nx.DiGraph node iterator directly,
independent of nodes_to_show.
Fixes test_erd and all Diagram tests that failed due to empty graphs.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent d05cbdd commit f1c0725
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
0 commit comments