Skip to content

Commit 8dbefe8

Browse files
FilippoOlivoGiovanniCanali
authored andcommitted
fix codacy
1 parent da3bc62 commit 8dbefe8

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

pina/equation/equation_factory.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
from ..operator import grad, div, laplacian
77
from ..utils import check_consistency
88

9+
# Pylint warning disabled because the classes defined in this module
10+
# inherit from Equation and are meant to be simple containers for equations.
911

10-
class FixedValue(Equation):
12+
13+
class FixedValue(Equation): # pylint: disable=R0903
1114
"""
1215
Equation to enforce a fixed value. Can be used to enforce Dirichlet Boundary
1316
conditions.
@@ -24,7 +27,7 @@ def __init__(self, value, components=None):
2427
Default is ``None``.
2528
"""
2629

27-
def equation(input_, output_):
30+
def equation(_, output_):
2831
"""
2932
Definition of the equation to enforce a fixed value.
3033
@@ -42,7 +45,7 @@ def equation(input_, output_):
4245
super().__init__(equation)
4346

4447

45-
class FixedGradient(Equation):
48+
class FixedGradient(Equation): # pylint: disable=R0903
4649
"""
4750
Equation to enforce a fixed gradient for a specific condition.
4851
"""
@@ -78,7 +81,7 @@ def equation(input_, output_):
7881
super().__init__(equation)
7982

8083

81-
class FixedFlux(Equation):
84+
class FixedFlux(Equation): # pylint: disable=R0903
8285
"""
8386
Equation to enforce a fixed flux, or divergence, for a specific condition.
8487
"""
@@ -113,7 +116,7 @@ def equation(input_, output_):
113116
super().__init__(equation)
114117

115118

116-
class FixedLaplacian(Equation):
119+
class FixedLaplacian(Equation): # pylint: disable=R0903
117120
"""
118121
Equation to enforce a fixed laplacian for a specific condition.
119122
"""
@@ -151,8 +154,8 @@ def equation(input_, output_):
151154
super().__init__(equation)
152155

153156

154-
class Laplace(FixedLaplacian):
155-
"""
157+
class Laplace(FixedLaplacian): # pylint: disable=R0903
158+
r"""
156159
Equation to enforce a null laplacian for a specific condition.
157160
The equation is defined as follows:
158161
@@ -178,7 +181,7 @@ def __init__(self, components=None, d=None):
178181
super().__init__(0.0, components=components, d=d)
179182

180183

181-
class Advection(Equation):
184+
class Advection(Equation): # pylint: disable=R0903
182185
r"""
183186
Implementation of the N-dimensional advection equation with constant
184187
velocity parameter. The equation is defined as follows:
@@ -266,7 +269,7 @@ def equation(input_, output_):
266269
super().__init__(equation)
267270

268271

269-
class AllenCahn(Equation):
272+
class AllenCahn(Equation): # pylint: disable=R0903
270273
r"""
271274
Implementation of the N-dimensional Allen-Cahn equation, defined as follows:
272275
@@ -319,7 +322,7 @@ def equation(input_, output_):
319322
super().__init__(equation)
320323

321324

322-
class DiffusionReaction(Equation):
325+
class DiffusionReaction(Equation): # pylint: disable=R0903
323326
r"""
324327
Implementation of the N-dimensional Diffusion-Reaction equation,
325328
defined as follows:
@@ -374,7 +377,7 @@ def equation(input_, output_):
374377
super().__init__(equation)
375378

376379

377-
class Helmholtz(Equation):
380+
class Helmholtz(Equation): # pylint: disable=R0903
378381
r"""
379382
Implementation of the Helmholtz equation, defined as follows:
380383
@@ -415,7 +418,7 @@ def equation(input_, output_):
415418
super().__init__(equation)
416419

417420

418-
class Poisson(Equation):
421+
class Poisson(Equation): # pylint: disable=R0903
419422
r"""
420423
Implementation of the Poisson equation, defined as follows:
421424

0 commit comments

Comments
 (0)