FEM: code formating, Python flake8: W503
This commit is contained in:
@@ -80,7 +80,7 @@ def isOfType(obj, t):
|
||||
|
||||
|
||||
def isDerivedFrom(obj, t):
|
||||
if (hasattr(obj, "Proxy") and hasattr(obj.Proxy, "Type")
|
||||
and obj.Proxy.Type == t):
|
||||
if (hasattr(obj, "Proxy") and hasattr(obj.Proxy, "Type") and
|
||||
obj.Proxy.Type == t):
|
||||
return True
|
||||
return obj.isDerivedFrom(t)
|
||||
|
||||
@@ -332,5 +332,5 @@ class ControlWidget(QtGui.QWidget):
|
||||
self._directoryGrp.setDisabled(False)
|
||||
self._writeBtt.setDisabled(False)
|
||||
self._editBtt.setDisabled(
|
||||
not machine.solver.Proxy.editSupported()
|
||||
or machine.state < femsolver.run.PREPARE)
|
||||
not machine.solver.Proxy.editSupported() or
|
||||
machine.state < femsolver.run.PREPARE)
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user