From 038ec948d06eeef87a2760ccc36274e93c73d680 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 11 Mar 2024 22:27:50 +0100 Subject: [PATCH] Fix ruff/pyupgrade issue (UP033) UP033 Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)` https://docs.astral.sh/ruff/rules/lru-cache-with-maxsize-none/ --- zarr/storage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zarr/storage.py b/zarr/storage.py index 47b2dd2b21..c647b2bae6 100644 --- a/zarr/storage.py +++ b/zarr/storage.py @@ -17,6 +17,7 @@ import atexit import errno +import functools import glob import multiprocessing import operator @@ -29,7 +30,6 @@ import zipfile from collections import OrderedDict from collections.abc import MutableMapping -from functools import lru_cache from os import scandir from pickle import PicklingError from threading import Lock, RLock @@ -1541,7 +1541,7 @@ def clear(self): self.map.clear() @classmethod - @lru_cache(maxsize=None) + @functools.cache def _fsspec_installed(cls): """Returns true if fsspec is installed""" import importlib.util