Codacy correction

This commit is contained in:
FilippoOlivo
2024-10-31 09:50:19 +01:00
committed by Nicola Demo
parent ea3d1924e7
commit dd43c8304c
23 changed files with 246 additions and 214 deletions

View File

@@ -6,6 +6,7 @@ from ..graph import Graph
from ..utils import check_consistency
from ..equation.equation_interface import EquationInterface
class InputPointsEquationCondition(ConditionInterface):
"""
Condition for input_points/equation data. This condition must be used every
@@ -25,10 +26,12 @@ class InputPointsEquationCondition(ConditionInterface):
def __setattr__(self, key, value):
if key == 'input_points':
check_consistency(value, (LabelTensor)) # for now only labeltensors, we need labels for the operators!
check_consistency(
value, (LabelTensor)
) # for now only labeltensors, we need labels for the operators!
InputPointsEquationCondition.__dict__[key].__set__(self, value)
elif key == 'equation':
check_consistency(value, (EquationInterface))
InputPointsEquationCondition.__dict__[key].__set__(self, value)
elif key in ('_problem', '_condition_type'):
super().__setattr__(key, value)
super().__setattr__(key, value)