From e20ebf946fcd448f9360a6ee4535e0878cbe1c8d Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Wed, 14 Nov 2018 11:11:38 +0100
Subject: [PATCH] PEP8 compliance

---
 boundaries/boundaryhandling.py | 7 +++----
 phasefield/analytical.py       | 1 +
 updatekernels.py               | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/boundaries/boundaryhandling.py b/boundaries/boundaryhandling.py
index 7d52c8a1..4f2a0c61 100644
--- a/boundaries/boundaryhandling.py
+++ b/boundaries/boundaryhandling.py
@@ -90,10 +90,9 @@ class LbmWeightInfo(CustomCppCode):
 
     def __init__(self, lb_method):
         weights = [str(w.evalf()) for w in lb_method.weights]
-        code = "const double __attribute__((unused)) %s [] = { %s };\n" % (
-                   LbmWeightInfo.WEIGHTS_SYMBOL.name, ",".join(weights))
-        super(LbmWeightInfo, self).__init__(code, symbols_read=set(),
-                                            symbols_defined={LbmWeightInfo.WEIGHTS_SYMBOL})
+        w_sym = LbmWeightInfo.WEIGHTS_SYMBOL
+        code = "const double __attribute__((unused)) %s [] = { %s };\n" % (w_sym.name, ",".join(weights))
+        super(LbmWeightInfo, self).__init__(code, symbols_read=set(), symbols_defined={w_sym})
 
 
 def create_lattice_boltzmann_boundary_kernel(pdf_field, index_field, lb_method, boundary_functor,
diff --git a/phasefield/analytical.py b/phasefield/analytical.py
index 927929c5..5328a73c 100644
--- a/phasefield/analytical.py
+++ b/phasefield/analytical.py
@@ -83,6 +83,7 @@ def n_phases_correction_function(c, beta, power=2):
                         (-beta * (1 - c) ** power, c > 1),
                         (c ** 2 * (1 - c) ** 2, True))
 
+
 def n_phases_correction_function_wrong(c, beta, power=2):
     return sp.Piecewise((-beta * c ** power, c < 0),
                         (-beta * (1 - c) ** power, c > 1),
diff --git a/updatekernels.py b/updatekernels.py
index 1dfb9e6a..9c562b94 100644
--- a/updatekernels.py
+++ b/updatekernels.py
@@ -58,7 +58,7 @@ def create_stream_pull_only_kernel(stencil, numpy_arr=None, src_field_name="src"
     if numpy_arr is None:
         src = Field.create_generic(src_field_name, dim, index_shape=(len(stencil),),
                                    layout=generic_layout, dtype=generic_field_type)
-        dst = Field.create_generic(dst_field_name, dim,  index_shape=(len(stencil),),
+        dst = Field.create_generic(dst_field_name, dim, index_shape=(len(stencil),),
                                    layout=generic_layout, dtype=generic_field_type)
     else:
         src = Field.create_from_numpy_array(src_field_name, numpy_arr, index_dimensions=1)
-- 
GitLab