File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ def topo_sort(graph):
4242 if (master := extract_master (part )) in graph :
4343 for edge in graph .in_edges (part ):
4444 parent = edge [0 ]
45- if parent != master and extract_master (parent ) != master :
45+ if master not in (parent , extract_master (parent )):
46+ # if parent is neither master nor part of master
4647 graph .add_edge (parent , master )
4748 sorted_nodes = list (nx .topological_sort (graph ))
4849
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ class Diagram(nx.DiGraph):
6161 draws the diagram using pyplot
6262
6363 diag1 + diag2 - combines the two diagrams.
64- diag1 - diag2 - differente between diagrams
65- diag1 * diag2 - intersction of diagrams
64+ diag1 - diag2 - difference between diagrams
65+ diag1 * diag2 - intersection of diagrams
6666 diag + n - expands n levels of successors
6767 diag - n - expands n levels of predecessors
6868 Thus dj.Diagram(schema.Table)+1-1 defines the diagram of immediate ancestors and descendants of schema.Table
@@ -71,7 +71,7 @@ class Diagram(nx.DiGraph):
7171 Only those tables that are loaded in the connection object are displayed
7272 """
7373
74- def __init__ (self , source = None , context = None ):
74+ def __init__ (self , source , context = None ):
7575
7676 if isinstance (source , Diagram ):
7777 # copy constructor
Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ class _AliasNode:
257257
258258
259259def _get_tier (table_name ):
260- """given the table name, return"""
260+ """given the table name, return the use table class. """
261261 if not table_name .startswith ("`" ):
262262 return _AliasNode
263263 else :
You can’t perform that action at this time.
0 commit comments