From 3077a1b4231c13fa20a082c8d546b895b83d9979 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 1 Dec 2025 12:02:03 -0600 Subject: [PATCH] Fix newly-flagged ruff issues --- pycuda/compiler.py | 6 +++--- test/test_gpuarray.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pycuda/compiler.py b/pycuda/compiler.py index d4edd653..5715462e 100644 --- a/pycuda/compiler.py +++ b/pycuda/compiler.py @@ -210,9 +210,9 @@ def _find_pycuda_include_path(): DEFAULT_NVCC_FLAGS = [ - _flag.strip() - for _flag in os.environ.get("PYCUDA_DEFAULT_NVCC_FLAGS", "").split() - if _flag.strip() + flag.strip() + for flag in os.environ.get("PYCUDA_DEFAULT_NVCC_FLAGS", "").split() + if flag.strip() ] diff --git a/test/test_gpuarray.py b/test/test_gpuarray.py index 6bc05566..18516a46 100644 --- a/test/test_gpuarray.py +++ b/test/test_gpuarray.py @@ -796,8 +796,8 @@ def test_any(self, dtype): assert any_ary_gpu.dtype == any_ary.dtype import itertools - for _array in list(itertools.product([0, 1], [0, 1], [0, 1])): - array = np.array(_array, dtype) + for array_ in list(itertools.product([0, 1], [0, 1], [0, 1])): + array = np.array(array_, dtype) array_gpu = gpuarray.to_gpu(array) any_array = np.any(array) any_array_gpu = array_gpu.any().get() @@ -821,8 +821,8 @@ def test_all(self, dtype): assert all_ary_gpu.dtype == all_ary.dtype import itertools - for _array in list(itertools.product([0, 1], [0, 1], [0, 1])): - array = np.array(_array, dtype) + for array_ in list(itertools.product([0, 1], [0, 1], [0, 1])): + array = np.array(array_, dtype) array_gpu = gpuarray.to_gpu(array) all_array = np.all(array) all_array_gpu = array_gpu.all().get()