From a47fb61c6b31bc046fe2f4895e1fbe427f8d886b Mon Sep 17 00:00:00 2001
From: "[6~" <inform@tiker.net>
Date: Mon, 11 May 2020 17:03:21 -0500
Subject: [PATCH] Placate flake8 3.8

---
 pyopencl/__init__.py     | 2 +-
 pyopencl/algorithm.py    | 4 ++--
 pyopencl/capture_call.py | 4 ++--
 pyopencl/invoker.py      | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py
index 7f276a81..0f302343 100644
--- a/pyopencl/__init__.py
+++ b/pyopencl/__init__.py
@@ -161,7 +161,7 @@ if not _PYPY:
 
 if get_cl_header_version() >= (1, 1):
     from pyopencl._cl import (  # noqa
-          UserEvent,
+        UserEvent,
         )
 if get_cl_header_version() >= (1, 2):
     from pyopencl._cl import (  # noqa
diff --git a/pyopencl/algorithm.py b/pyopencl/algorithm.py
index 430199b9..4b0e293c 100644
--- a/pyopencl/algorithm.py
+++ b/pyopencl/algorithm.py
@@ -296,9 +296,9 @@ def to_bin(n):
     return ''.join(digs[::-1])
 
 
-def _padded_bin(i, l):
+def _padded_bin(i, nbits):
     s = to_bin(i)
-    while len(s) < l:
+    while len(s) < nbits:
         s = '0' + s
     return s
 
diff --git a/pyopencl/capture_call.py b/pyopencl/capture_call.py
index 09d483a5..527d8cae 100644
--- a/pyopencl/capture_call.py
+++ b/pyopencl/capture_call.py
@@ -51,8 +51,8 @@ def capture_kernel_call(kernel, filename, queue, g_size, l_size, *args, **kwargs
     cg("")
 
     cg('CODE = r"""//CL//')
-    for l in source.split("\n"):
-        cg(l)
+    for line in source.split("\n"):
+        cg(line)
     cg('"""')
 
     # {{{ invocation
diff --git a/pyopencl/invoker.py b/pyopencl/invoker.py
index b580c537..4d01888f 100644
--- a/pyopencl/invoker.py
+++ b/pyopencl/invoker.py
@@ -162,7 +162,7 @@ def generate_specific_arg_handling_body(function_name,
                         "some (but not all) of the target devices mishandle "
                         "struct kernel arguments (hence the workaround is "
                         "disabled".format(
-                            knl_name=function_name, stacklevel=2))
+                            knl_name=function_name), stacklevel=2)
 
             if arg_dtype == np.complex64:
                 arg_char = "f"
-- 
GitLab