Skip to content

Commit

Permalink
Don't let labels interfere with the path
Browse files Browse the repository at this point in the history
  • Loading branch information
liamhuber committed Jan 16, 2024
1 parent 5b525f1 commit 1ec3f66
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pyiron_workflow/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ def __init__(
**kwargs: Keyword arguments passed on with `super`.
"""
super().__init__(*args, **kwargs)
self._label = None
self.label: str = label
self._parent = None
if parent is not None:
Expand All @@ -268,6 +269,16 @@ def __post__(self, *args, run_after_init: bool = False, **kwargs):
except ReadinessError:
pass

@property
def label(self) -> str:
return self._label

@label.setter
def label(self, new_label: str):
if self._semantic_delimiter in new_label:
raise ValueError(f"{self._semantic_delimiter} cannot be in the label")
self._label = new_label

@property
@abstractmethod
def inputs(self) -> Inputs:
Expand Down

0 comments on commit 1ec3f66

Please sign in to comment.