FEM: code formating, Python flake8: W503

This commit is contained in:
Bernd Hahnebach
2018-01-01 21:03:43 +01:00
committed by wmayer
parent 0e65035ed4
commit fdc2086d11
4 changed files with 14 additions and 14 deletions

View File

@@ -178,11 +178,11 @@ class Builder(object):
for solverSection in eqSection[self._ACTIVE_SOLVERS]:
if solverSection not in allSections:
allSections.append(solverSection)
if (BODY_FORCE in section
and section[BODY_FORCE] not in allSections):
if (BODY_FORCE in section and
section[BODY_FORCE] not in allSections):
allSections.append(section[BODY_FORCE])
if (INITIAL_CONDITION in section
and section[INITIAL_CONDITION] not in allSections):
if (INITIAL_CONDITION in section and
section[INITIAL_CONDITION] not in allSections):
allSections.append(section[INITIAL_CONDITION])
for name, section in self._boundaries.items():
section["Name"] = name
@@ -331,8 +331,8 @@ class _Writer(object):
return it.next()
def _isCollection(self, data):
return (not isinstance(data, str)
and isinstance(data, collections.Iterable))
return (not isinstance(data, str) and
isinstance(data, collections.Iterable))
def _checkScalar(self, dataType):
if issubclass(dataType, int):

View File

@@ -187,8 +187,8 @@ class Machine(BaseTask):
self._confTasks()
self._isReset = False
self._pendingState = self.state
while (not self.aborted and not self.failed
and self._pendingState <= self.target):
while (not self.aborted and not self.failed and
self._pendingState <= self.target):
task = self._getTask(self._pendingState)
self._runTask(task)
self.report.extend(task.report)
@@ -368,8 +368,8 @@ class _DocObserver(object):
def _checkEquation(self, obj):
for o in obj.Document.Objects:
if (FemUtils.isDerivedFrom(o, "Fem::FemSolverObject")
and hasattr(o, "Group") and obj in o.Group):
if (FemUtils.isDerivedFrom(o, "Fem::FemSolverObject") and
hasattr(o, "Group") and obj in o.Group):
if o in _machines:
_machines[o].reset()