Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 469646a

Browse files
committed
Format black
1 parent f7bf498 commit 469646a

File tree

4 files changed

+18
-22
lines changed

4 files changed

+18
-22
lines changed

ironflow/gui/workflows/canvas_widgets/flow.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,15 @@ def _get_port_widgets_ontologically_compatible_with(self, port):
279279
additional_requirements=port.get_downstream_requirements()
280280
)
281281
return [
282-
subwidget for subwidget in self._port_widgets
282+
subwidget
283+
for subwidget in self._port_widgets
283284
if isinstance(subwidget.port, NodeOutput)
284285
and subwidget.port.all_connections_found_in(input_tree)
285286
]
286287
elif isinstance(port, NodeOutput):
287288
return [
288-
subwidget for subwidget in self._port_widgets
289+
subwidget
290+
for subwidget in self._port_widgets
289291
if subwidget.port.otype is not None # Progressively expensive checks
290292
and port.otype in subwidget.port.otype.get_sources()
291293
and subwidget.port.workflow_tree_contains_connections_of(port)

ironflow/model/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(
4242
if enable_ryven_log:
4343
self.session.info_messenger().enable()
4444

45-
self.nodes_dictionary = {'recommended': {}}
45+
self.nodes_dictionary = {"recommended": {}}
4646
from ironflow.nodes import built_in
4747
from ironflow.nodes.pyiron import atomistics_nodes
4848
from ironflow.nodes.std import (

ironflow/model/port.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,24 +91,25 @@ def _output_graph_is_represented_in_workflow_tree(self, output_port, input_tree)
9191
[output_port.otype == source.value for source in input_tree.children]
9292
)[0][0]
9393
upstream_inputs = [
94-
inp for inp in output_port.node.inputs
94+
inp
95+
for inp in output_port.node.inputs
9596
if inp.otype is not None and len(inp.connections) > 0
9697
]
9798
for usi in upstream_inputs:
9899
input_branches = input_tree.children[output_index].children[0].children
99100
# input/generic->outputs->function->inputs
100101

101102
input_index = argwhere(
102-
[
103-
usi.otype == source.value
104-
for source in input_branches
105-
]
103+
[usi.otype == source.value for source in input_branches]
106104
)[0][0]
107105

108106
for con in usi.connections:
109-
if con.out.otype is not None \
110-
and not self._output_graph_is_represented_in_workflow_tree(
111-
con.out, input_branches[input_index]):
107+
if (
108+
con.out.otype is not None
109+
and not self._output_graph_is_represented_in_workflow_tree(
110+
con.out, input_branches[input_index]
111+
)
112+
):
112113
return False
113114
return True
114115
except IndexError:

ironflow/nodes/pyiron/atomistics_nodes.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,13 @@ class AtomisticTaker(JobTaker, ABC):
422422
NodeOutputBP(
423423
label="energy_pot",
424424
dtype=dtypes.Float(),
425-
otype=ONTO.atomistic_taker_output_energy_pot
425+
otype=ONTO.atomistic_taker_output_energy_pot,
426426
),
427427
NodeOutputBP(
428428
label="forces",
429429
dtype=dtypes.List(valid_classes=[float, np.floating]),
430430
# Still not working because it's an nx3 matrix, not an n-long list
431-
otype=ONTO.atomistic_taker_output_forces
431+
otype=ONTO.atomistic_taker_output_forces,
432432
),
433433
]
434434
init_inputs = deepcopy(JobTaker.init_inputs)
@@ -688,21 +688,14 @@ class SurfaceEnergy_Node(DataNode):
688688
]
689689

690690
def node_function(
691-
self,
692-
bulk_structure,
693-
bulk_energy,
694-
surface_structure,
695-
surface_energy,
696-
**kwargs
691+
self, bulk_structure, bulk_energy, surface_structure, surface_energy, **kwargs
697692
) -> dict:
698693
n_bulk = len(bulk_structure)
699694
n_surface = len(surface_structure)
700695
energy_difference = surface_energy - (n_surface / n_bulk) * bulk_energy
701696
a, b, c = surface_structure.cell.array
702697
area = np.dot(np.cross(a, b), c / np.linalg.norm(c))
703-
return {
704-
"surface_energy": energy_difference / (2 * area)
705-
}
698+
return {"surface_energy": energy_difference / (2 * area)}
706699

707700

708701
class PyironTable_Node(JobMaker):

0 commit comments

Comments
 (0)