diff --git a/doc/getting_started/tutorials/04.reductions.ipynb b/doc/getting_started/tutorials/04.reductions.ipynb index b862e297..f81ffc82 100644 --- a/doc/getting_started/tutorials/04.reductions.ipynb +++ b/doc/getting_started/tutorials/04.reductions.ipynb @@ -188,7 +188,7 @@ "outputs": [], "source": [ "def plot_meas(meas_np, meas, chunks):\n", - " fig, ax = plt.subplots()\n", + " _fig, ax = plt.subplots()\n", "\n", " # Define the groups and bar width\n", " groups = meas_np[\"time\"].keys()\n", diff --git a/pyproject.toml b/pyproject.toml index f4373510..089bcfd9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,3 +101,6 @@ ignore = [ "RET508", "SIM108", ] + +[tool.ruff.lint.extend-per-file-ignores] +"tests/**" = ["F841"] diff --git a/src/blosc2/core.py b/src/blosc2/core.py index 91690003..611f113f 100644 --- a/src/blosc2/core.py +++ b/src/blosc2/core.py @@ -1085,7 +1085,7 @@ def print_versions(): for clib in sorted(clib_versions.keys()): print(f" {clib}: {clib_versions[clib]}") print(f"Python version: {sys.version}") - (sysname, nodename, release, version, machine, processor) = platform.uname() + (sysname, _nodename, release, version, machine, processor) = platform.uname() print(f"Platform: {sysname}-{release}-{machine} ({version})") if sysname == "Linux": distro = os_release_pretty_name() diff --git a/src/blosc2/lazyexpr.py b/src/blosc2/lazyexpr.py index 14d25a59..f1d41f8c 100644 --- a/src/blosc2/lazyexpr.py +++ b/src/blosc2/lazyexpr.py @@ -539,7 +539,7 @@ def fill_chunk_operands( if nchunk == 0: # Initialize the iterator for reading the chunks arr = operands["o0"] - chunks_idx, nchunks = get_chunks_idx(arr.shape, arr.chunks) + chunks_idx, _ = get_chunks_idx(arr.shape, arr.chunks) info = (reduc, aligned, low_mem, chunks_idx) iter_chunks = read_nchunk(list(operands.values()), info) # Run the asynchronous file reading function from a synchronous context @@ -1162,7 +1162,7 @@ def chunked_eval(expression: str | Callable[[tuple, np.ndarray, tuple[int]], Non if where: # Make the where arguments part of the operands operands = {**operands, **where} - shape, _, _, fast_path = validate_inputs(operands, out) + _, _, _, fast_path = validate_inputs(operands, out) # Activate last read cache for NDField instances for op in operands: @@ -1364,7 +1364,7 @@ def get_chunk(self, nchunk): shape = out.shape chunks = out.chunks # Calculate the shape of the (chunk) slice_ (specially at the end of the array) - chunks_idx, nchunks = get_chunks_idx(shape, chunks) + chunks_idx, _ = get_chunks_idx(shape, chunks) coords = tuple(np.unravel_index(nchunk, chunks_idx)) slice_ = tuple( slice(c * s, min((c + 1) * s, shape[i]))