From 4bae07a3cb5753f78da648017caa7c0ffb917426 Mon Sep 17 00:00:00 2001
From: Michael Kuron <mkuron@icp.uni-stuttgart.de>
Date: Thu, 23 Jan 2020 11:42:21 +0100
Subject: [PATCH] flake8 complex numbers

---
 pystencils/cpu/cpujit.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pystencils/cpu/cpujit.py b/pystencils/cpu/cpujit.py
index 8e8242065..07a8a84d9 100644
--- a/pystencils/cpu/cpujit.py
+++ b/pystencils/cpu/cpujit.py
@@ -270,7 +270,8 @@ if( PyErr_Occurred() ) {{ return NULL; }}
 template_extract_complex = """
 PyObject * obj_{name} = PyDict_GetItemString(kwargs, "{name}");
 if( obj_{name} == NULL) {{  PyErr_SetString(PyExc_TypeError, "Keyword argument '{name}' missing"); return NULL; }};
-{target_type} {name}{{ ({real_type}) {extract_function_real}( obj_{name} ), ({real_type}) {extract_function_imag}( obj_{name} ) }};
+{target_type} {name}{{ ({real_type}) {extract_function_real}( obj_{name} ),
+                       ({real_type}) {extract_function_imag}( obj_{name} ) }};
 if( PyErr_Occurred() ) {{ return NULL; }}
 """
 
@@ -409,7 +410,8 @@ def create_function_boilerplate_code(parameter_info, name, insert_checks=True):
                 pre_call_code += template_extract_complex.format(extract_function_real=extract_function[0],
                                                                  extract_function_imag=extract_function[1],
                                                                  target_type=target_type,
-                                                                 real_type="float" if target_type == "ComplexFloat" else "double",
+                                                                 real_type="float" if target_type == "ComplexFloat"
+                                                                           else "double",
                                                                  name=param.symbol.name)
             else:
                 pre_call_code += template_extract_scalar.format(extract_function=extract_function,
-- 
GitLab