|
12 | 12 | from typing import Any |
13 | 13 | from typing import Callable |
14 | 14 | from typing import Literal |
15 | | -import warnings |
16 | 15 |
|
17 | 16 | from rich.console import Console |
18 | 17 | from rich.console import RenderableType |
|
26 | 25 | from rich.tree import Tree |
27 | 26 |
|
28 | 27 | from _pytask.data_catalog_utils import DATA_CATALOG_NAME_FIELD |
29 | | -from _pytask.node_protocols import PNode, warn_about_upcoming_attributes_field_on_nodes |
| 28 | +from _pytask.node_protocols import PNode |
30 | 29 | from _pytask.node_protocols import PPathNode |
31 | 30 | from _pytask.node_protocols import PProvisionalNode |
32 | 31 | from _pytask.node_protocols import PTaskWithPath |
| 32 | +from _pytask.node_protocols import warn_about_upcoming_attributes_field_on_nodes |
33 | 33 | from _pytask.path import shorten_path |
34 | 34 |
|
35 | 35 | if TYPE_CHECKING: |
@@ -149,7 +149,9 @@ def format_node_name( |
149 | 149 | """Format the name of a node.""" |
150 | 150 | if isinstance(node, PPathNode): |
151 | 151 | if node.name != node.path.as_posix(): |
152 | | - if data_catalog_name := getattr(node, "attributes", {}).get(DATA_CATALOG_NAME_FIELD): |
| 152 | + if data_catalog_name := getattr(node, "attributes", {}).get( |
| 153 | + DATA_CATALOG_NAME_FIELD |
| 154 | + ): |
153 | 155 | return Text(f"{data_catalog_name}::{node.name}") |
154 | 156 | warn_about_upcoming_attributes_field_on_nodes() |
155 | 157 | return Text(node.name) |
|
0 commit comments