FEM: code formating, flake8

This commit is contained in:
Bernd Hahnebach
2019-01-04 11:06:00 +01:00
committed by wmayer
parent 3f443d2264
commit 2e6dac1871
4 changed files with 14 additions and 14 deletions

View File

@@ -81,6 +81,7 @@ class Prepare(run.Prepare):
except IOError as e:
self.report.error("Can't access working directory.")
self.fail()
del e # get flake8 quit
def checkHandled(self, w):
handled = w.getHandledConstraints()

View File

@@ -138,12 +138,11 @@ else:
# TODO: python classes much slower than JIT compilation
# ***********************************
# * Sub classes due to value_shape method which is not of dynamical return type
# * Also the assignment of values is to be done by reference. Therefore it has to be
# * overloaded.
# ***********************************
# ***********************************
# * Sub classes due to value_shape method which is not of dynamical return type
# * Also the assignment of values is to be done by reference. Therefore it has to be
# * overloaded.
# ***********************************
class ScalarCellExpressionFromXDMF(fenics.Expression, CellExpressionFromXDMF):

View File

@@ -120,10 +120,10 @@ class TestMeshCommon(unittest.TestCase):
read_file = open(inp_file, 'r')
read_node_line = 'line was not found'
for l in read_file:
l = l.strip()
if l.startswith('2, -5'):
read_node_line = l
for ln in read_file:
ln = ln.strip()
if ln.startswith('2, -5'):
read_node_line = ln
read_file.close()
# 1234567 12345678901234567890 12345678901234567890

View File

@@ -154,10 +154,10 @@ def compare_stats(fea, stat_file=None, loc_stat_types=None, res_obj_name=None):
def force_unix_line_ends(line_list):
new_line_list = []
for l in line_list:
if l.endswith("\r\n"):
l = l[:-2] + '\n'
new_line_list.append(l)
for ln in line_list:
if ln.endswith("\r\n"):
ln = ln[:-2] + '\n'
new_line_list.append(ln)
return new_line_list