From 86f082976adb0779a1f257841ec454cbf2ded53d Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Mon, 21 Oct 2019 13:40:44 +0200
Subject: [PATCH] Style fixes

---
 pystencils/backends/cbackend.py | 2 +-
 pystencils/cpu/vectorization.py | 4 ----
 pystencils/data_types.py        | 2 ++
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/pystencils/backends/cbackend.py b/pystencils/backends/cbackend.py
index ab0aa8a43..a25ba876c 100644
--- a/pystencils/backends/cbackend.py
+++ b/pystencils/backends/cbackend.py
@@ -239,7 +239,7 @@ class CBackend:
                 instr = 'storeU'
                 if aligned:
                     instr = 'stream' if nontemporal else 'storeA'
-                if mask != True:
+                if mask != True:  # NOQA
                     instr = 'maskStore' if aligned else 'maskStoreU'
                     printed_mask = self.sympy_printer.doprint(mask)
                     if self._vector_instruction_set['dataTypePrefix']['double'] == '__mm256d':
diff --git a/pystencils/cpu/vectorization.py b/pystencils/cpu/vectorization.py
index c5080aa20..1e3a434bc 100644
--- a/pystencils/cpu/vectorization.py
+++ b/pystencils/cpu/vectorization.py
@@ -232,10 +232,6 @@ def insert_vector_casts(ast_node):
                         assignment.lhs = new_lhs
                 elif isinstance(assignment.lhs, vector_memory_access):
                     assignment.lhs = visit_expr(assignment.lhs)
-                #elif isinstance(assignment.lhs, cast_func): # TODO check if necessary
-                #    lhs_type = assignment.lhs.args[1]
-                #    if type(lhs_type) is VectorType and type(rhs_type) is not VectorType:
-                #        assignment.rhs = cast_func(assignment.rhs, lhs_type)
             elif isinstance(arg, ast.Conditional):
                 arg.condition_expr = fast_subs(arg.condition_expr, substitution_dict,
                                                skip=lambda e: isinstance(e, ast.ResolvedFieldAccess))
diff --git a/pystencils/data_types.py b/pystencils/data_types.py
index 6fb15be18..e2f224757 100644
--- a/pystencils/data_types.py
+++ b/pystencils/data_types.py
@@ -27,10 +27,12 @@ def typed_symbols(names, dtype, *args):
     else:
         return TypedSymbol(str(symbols), dtype)
 
+
 def type_all_numbers(expr, dtype):
     substitutions = {a: cast_func(a, dtype) for a in expr.atoms(sp.Number)}
     return expr.subs(substitutions)
 
+
 def matrix_symbols(names, dtype, rows, cols):
     if isinstance(names, str):
         names = names.replace(' ', '').split(',')
-- 
GitLab