We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7d2789 commit 4a56f3dCopy full SHA for 4a56f3d
pyiron_workflow/mixin/semantics.py
@@ -65,12 +65,11 @@ def parent(self, new_parent: SemanticParent | None) -> None:
65
# Exit early if nothing is changing
66
return
67
68
- if new_parent is not None:
69
- if not isinstance(new_parent, SemanticParent):
70
- raise ValueError(
71
- f"Expected None or a {SemanticParent.__name__} for the parent of "
72
- f"{self.label}, but got {new_parent}"
73
- )
+ if new_parent is not None and not isinstance(new_parent, SemanticParent):
+ raise ValueError(
+ f"Expected None or a {SemanticParent.__name__} for the parent of "
+ f"{self.label}, but got {new_parent}"
+ )
74
75
if (
76
self._parent is not None
0 commit comments