File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ def format_node_name(
148148 """Format the name of a node."""
149149 if isinstance (node , PPathNode ):
150150 if node .name != node .path .as_posix ():
151+ # For example, any node added to a data catalog has its name set to the key.
151152 if data_catalog_name := getattr (node , "attributes" , {}).get (
152153 DATA_CATALOG_NAME_FIELD
153154 ):
@@ -162,6 +163,11 @@ def format_node_name(
162163 reduced_name = shorten_path (Path (path ), paths )
163164 return Text (f"{ reduced_name } ::{ rest } " )
164165
166+ # Python or other custom nodes that are not PathNodes.
167+ if data_catalog_name := getattr (node , "attributes" , {}).get (
168+ DATA_CATALOG_NAME_FIELD
169+ ):
170+ return Text (f"{ data_catalog_name } ::{ node .name } " )
165171 return Text (node .name )
166172
167173
You can’t perform that action at this time.
0 commit comments