Skip to content

Commit 71fb3f4

Browse files
committed
Minor fix
1 parent ef15acc commit 71fb3f4

File tree

16 files changed

+13
-20
lines changed

16 files changed

+13
-20
lines changed

pina/data/data_module.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ class PinaDataModule(LightningDataModule):
157157
management of different types of Datasets defined in PINA
158158
"""
159159

160-
# pylint: disable=R0917
161160
def __init__(
162161
self,
163162
problem,
@@ -424,6 +423,8 @@ def test_dataloader(self):
424423
return self._create_dataloader("test", self.test_dataset)
425424

426425
@staticmethod
426+
# Unavoidable pylint error (we need to keep the same signature as the
427+
# parent)
427428
# pylint: disable=W0613
428429
def _transfer_batch_to_device_dummy(batch, device, dataloader_idx):
429430
return batch

pina/domain/difference_domain.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class Difference(OperationInterface):
1010
PINA implementation of Difference of Domains.
1111
"""
1212

13-
# pylint: disable=W0246
1413
def __init__(self, geometries):
1514
r"""
1615
Given two sets :math:`A` and :math:`B` then the

pina/domain/exclusion_domain.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class Exclusion(OperationInterface):
1111
PINA implementation of Exclusion of Domains.
1212
"""
1313

14-
# pylint: disable=W0246
1514
def __init__(self, geometries):
1615
r"""
1716
Given two sets :math:`A` and :math:`B` then the

pina/domain/intersection_domain.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class Intersection(OperationInterface):
1111
PINA implementation of Intersection of Domains.
1212
"""
1313

14-
# pylint: disable=W0246
1514
def __init__(self, geometries):
1615
r"""
1716
Given two sets :math:`A` and :math:`B` then the

pina/domain/simplex.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ def is_inside(self, point, check_border=False):
134134
point_shift = point_shift.tensor.reshape(-1, 1)
135135

136136
# compute barycentric coordinates
137-
# pylint: disable=E1102
138-
lambda_ = torch.linalg.solve(
137+
138+
lambda_ = torch.linalg.solve( # pylint: disable=E1102
139139
self._vectors_shifted * 1.0, point_shift * 1.0
140140
)
141141
lambda_1 = 1.0 - torch.sum(lambda_)

pina/domain/union_domain.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class Union(OperationInterface):
1111
Union of Domains.
1212
"""
1313

14-
# pylint: disable=W0246
1514
def __init__(self, geometries):
1615
r"""
1716
PINA implementation of Unions of Domains.

pina/equation/equation_factory.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def __init__(self, value, components=None):
2323
Default is ``None``.
2424
"""
2525

26+
# input_ is not used but it is necessary to keep the signature for
27+
# consistency
2628
# pylint: disable=W0613
2729
def equation(input_, output_):
2830
if components is None:

pina/model/average_neural_operator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class AveragingNeuralOperator(KernelNeuralOperator):
2626
<https://arxiv.org/abs/2304.13221>`_
2727
"""
2828

29-
# pylint: disable=R0917
3029
def __init__(
3130
self,
3231
lifting_net,

pina/model/block/convolution_2d.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ def forward(self, X):
379379
).sum(1)
380380
return conv
381381

382+
# Avoid too many arguments warning
382383
# pylint: disable=R0914
383384
def transpose_no_overlap(self, integrals, X):
384385
"""

pina/model/block/gno_block.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def __init__(
2828
:param edges_features: Number of edge features.
2929
:param n_layers: Number of layers in edge transformation MLP.
3030
"""
31-
# Avoid circular import
31+
# Avoid circular import. I need to import FeedForward here
32+
# to avoid circular import with FeedForward itself.
3233
# pylint: disable=import-outside-toplevel
3334
from ...model.feed_forward import FeedForward
3435

@@ -71,7 +72,6 @@ def edge_update(self, edge_attr):
7172
"""
7273
Updates edge features.
7374
"""
74-
# This method is done to avoid pylint warning (W0246)
7575
return edge_attr
7676

7777
def update(self, aggr_out, x):

0 commit comments

Comments
 (0)