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(
148
148
"""Format the name of a node."""
149
149
if isinstance (node , PPathNode ):
150
150
if node .name != node .path .as_posix ():
151
+ # For example, any node added to a data catalog has its name set to the key.
151
152
if data_catalog_name := getattr (node , "attributes" , {}).get (
152
153
DATA_CATALOG_NAME_FIELD
153
154
):
@@ -162,6 +163,11 @@ def format_node_name(
162
163
reduced_name = shorten_path (Path (path ), paths )
163
164
return Text (f"{ reduced_name } ::{ rest } " )
164
165
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 } " )
165
171
return Text (node .name )
166
172
167
173
You can’t perform that action at this time.
0 commit comments