|
21 | 21 | from _pytask.models import NodeInfo |
22 | 22 | from _pytask.node_protocols import PNode |
23 | 23 | from _pytask.node_protocols import PProvisionalNode |
24 | | -from _pytask.node_protocols import warn_about_upcoming_attributes_field_on_nodes |
25 | 24 | from _pytask.nodes import PickleNode |
26 | 25 | from _pytask.pluginmanager import storage |
27 | 26 | from _pytask.session import Session |
@@ -102,10 +101,7 @@ def __post_init__(self) -> None: |
102 | 101 | # Initialize the data catalog with persisted nodes from previous runs. |
103 | 102 | for path in self.path.glob("*-node.pkl"): |
104 | 103 | node = pickle.loads(path.read_bytes()) # noqa: S301 |
105 | | - if not hasattr(node, "attributes"): |
106 | | - warn_about_upcoming_attributes_field_on_nodes() |
107 | | - else: |
108 | | - node.attributes = {DATA_CATALOG_NAME_FIELD: self.name} |
| 104 | + node.attributes[DATA_CATALOG_NAME_FIELD] = self.name |
109 | 105 | self._entries[node.name] = node |
110 | 106 |
|
111 | 107 | def __getitem__(self, name: str) -> PNode | PProvisionalNode: |
@@ -150,7 +146,4 @@ def add(self, name: str, node: PNode | PProvisionalNode | Any = None) -> None: |
150 | 146 | self._entries[name] = collected_node |
151 | 147 |
|
152 | 148 | node = self._entries[name] |
153 | | - if hasattr(node, "attributes"): |
154 | | - node.attributes[DATA_CATALOG_NAME_FIELD] = self.name # ty: ignore[invalid-assignment] |
155 | | - else: |
156 | | - warn_about_upcoming_attributes_field_on_nodes() |
| 149 | + node.attributes[DATA_CATALOG_NAME_FIELD] = self.name |
0 commit comments