diff --git a/pyopencl/array.py b/pyopencl/array.py index 9d1b66b91ed59be814292237380a00f4b6261b32..1bfdc137434e88700cfb987d107f720fe8ed1702 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -1,5 +1,7 @@ """CL device arrays.""" +# pylint:disable=unexpected-keyword-arg # for @elwise_kernel_runner + from __future__ import division, absolute_import __copyright__ = "Copyright (C) 2009 Andreas Kloeckner" diff --git a/pyopencl/cache.py b/pyopencl/cache.py index 3e4bc65d13dc62267c5d12e3346842e4617327c8..fd46dc5c88fd85b3731f5758d38ee56492f9f69e 100644 --- a/pyopencl/cache.py +++ b/pyopencl/cache.py @@ -482,7 +482,7 @@ def create_built_program_from_source_cached(ctx, src, options_bytes, devices=Non except Exception as e: from pyopencl import Error if (isinstance(e, Error) - and e.code == _cl.status_code.BUILD_PROGRAM_FAILURE): + and e.code == _cl.status_code.BUILD_PROGRAM_FAILURE): # noqa pylint:disable=no-member # no need to try again raise diff --git a/pyopencl/clmath.py b/pyopencl/clmath.py index 6d45fe44ceb02fa13c7c6fb4563045e3aecdd87c..2ae8bfbfa22fd1842134c8db96be03a2e7fb9a44 100644 --- a/pyopencl/clmath.py +++ b/pyopencl/clmath.py @@ -1,4 +1,7 @@ from __future__ import absolute_import + +# pylint:disable=unexpected-keyword-arg # for @elwise_kernel_runner + __copyright__ = "Copyright (C) 2009 Andreas Kloeckner" __license__ = """ diff --git a/test/test_array.py b/test/test_array.py index d7274c68f71b4dececf5402015507dcc5b69bfd9..811969a6775a69d2368360e3a7e83f0d02418822 100644 --- a/test/test_array.py +++ b/test/test_array.py @@ -571,7 +571,7 @@ def test_bitwise(ctx_factory): # Test unary ~ res_dev = ~a_dev - res = ~a + res = ~a # pylint:disable=invalid-unary-operand-type assert (res_dev.get() == res).all() # }}} @@ -1072,7 +1072,7 @@ def test_skip_slicing(ctx_factory): a = cl_array.to_device(queue, a_host) b = a[::3] assert b.shape == b_host.shape - assert np.array_equal(b[1].get(), b_host[1]) + assert np.array_equal(b[1].get(), b_host[1]) # pylint:disable=unsubscriptable-object def test_transpose(ctx_factory): diff --git a/test/test_wrapper.py b/test/test_wrapper.py index fba8ceb9d6cdcdc04792f9d4e9f1f5f8b817d184..ee3219e971b931c50351332f140f4cfdf4d9591f 100644 --- a/test/test_wrapper.py +++ b/test/test_wrapper.py @@ -120,8 +120,7 @@ def test_get_info(ctx_factory): def do_test(cl_obj, info_cls, func=None, try_attr_form=True): if func is None: - def func(info): - cl_obj.get_info(info) + func = cl_obj.get_info for info_name in dir(info_cls): if not info_name.startswith("_") and info_name != "to_string": @@ -1030,7 +1029,7 @@ def test_fine_grain_svm(ctx_factory): @pytest.mark.parametrize("dtype", [ np.uint, - cl.cltypes.uint2, + cltypes.uint2, ]) def test_map_dtype(ctx_factory, dtype): if cl._PYPY: