Skip to content

Commit

Permalink
Format black
Browse files Browse the repository at this point in the history
  • Loading branch information
pyiron-runner committed Apr 4, 2023
1 parent 161994c commit c8700dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ironflow/model/port.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

class HasDType:
"""A mixin to add the valid value check property"""

def set_dtype_ok(self):
if self.dtype is not None:
if self.val is not None:
Expand All @@ -47,10 +48,10 @@ def dtype_ok(self):

class HasOType:
"""A mixin to add the valid value check to properties with an ontology type"""

def recalculate_otype_checks(self, ignore=None):
self.set_otype_ok()
if self.otype is not None:

# Along connections
for con in self.connections:
if isinstance(self, NodeInput):
Expand Down Expand Up @@ -205,16 +206,15 @@ def workflow_tree_contains_connections_of(self, port: NodeOutput):
def update(self, data=None):
# super().update(data=data)
# We need to add the dtype update _between_ the val update and node update
if self.type_ == 'data':
if self.type_ == "data":
self.val = data # self.get_val()
InfoMsgs.write('Data in input set to', data)
InfoMsgs.write("Data in input set to", data)

self.set_dtype_ok()

self.node.update(inp=self.node.inputs.index(self))

def connected(self):

super().connected()
self.set_dtype_ok()
self.recalculate_otype_checks() # Note: Only need to call or one of input or
Expand Down
1 change: 1 addition & 0 deletions ironflow/nodes/pyiron/atomistics_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
)
from ironflow.nodes.std.special_nodes import DualNodeBase
from ryvencore.InfoMsgs import InfoMsgs

if TYPE_CHECKING:
from pyiron_base import HasGroups

Expand Down

0 comments on commit c8700dc

Please sign in to comment.