Skip to content

Commit 9840f9a

Browse files
committed
Fix formatting inconsistencies
1 parent a75868c commit 9840f9a

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

pina/condition/condition_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ def problem(self):
1212

1313
@problem.setter
1414
def problem(self, value):
15-
self._problem = value
15+
self._problem = value

pina/data/dataset.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def _getitem_dummy(self, idx):
195195

196196
def _getitem_int(self, idx):
197197
return {
198-
k: v['graph'][idx % len(v["graph"])]
198+
k: v["graph"][idx % len(v["graph"])]
199199
for k, v in self.conditions_dict.items()
200200
}
201201

@@ -234,7 +234,6 @@ def create_graph_batch(self, data):
234234
"""
235235
print(data)
236236
return self._create_graph_batch_from_list(data)
237-
238237

239238
@staticmethod
240239
def _extract_output(func):

pina/solver/supervised.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ class SupervisedSolver(SingleSolverInterface):
3737
multiple (discretised) input functions.
3838
"""
3939

40-
accepted_conditions_types = (InputOutputPointsCondition, GraphInputOutputCondition)
40+
accepted_conditions_types = (
41+
InputOutputPointsCondition,
42+
GraphInputOutputCondition,
43+
)
4144

4245
def __init__(
4346
self,

tests/test_graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from torch_geometric.data import Data
66

77

8-
def build_edge_attr(graph ):
8+
def build_edge_attr(graph):
99
pos = graph.pos
1010
edge_index = graph.edge_index
1111
return torch.cat([pos[edge_index[0]], pos[edge_index[1]]], dim=-1)

tests/test_problem_zoo/test_supervised_problem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_constructor_graph():
2424
RadiusGraph(x=x_, pos=pos_, radius=0.2, edge_attr=True, y=y_)
2525
for x_, pos_, y_ in zip(x, pos, output_)
2626
]
27-
27+
2828
problem = SupervisedProblem(graph_=input_)
2929
assert isinstance(problem, AbstractProblem)
3030
assert hasattr(problem, "conditions")

0 commit comments

Comments
 (0)