diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index 7f276a814ff6e37a9f3854009c8d3bc1f89c55c7..0f30234371d64bb10e465a29e48e61b2e2f6c908 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 430199b98b62b0e14da0f34441384b9d219054e6..4b0e293cf6f616767dd9b6c626080768fe0cfc1f 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 09d483a57ad6d87387e519d8a72fea79142f3244..527d8caed96f70264762e75b211f2247b67c2495 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 b580c5375e298ff5d5864c52cebd656af42eac89..4d01888fc2a40297b19ce904ff90ea5072707fd6 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"