Skip to content

Commit

Permalink
Fix ruff/pyupgrade issue (UP033)
Browse files Browse the repository at this point in the history
UP033 Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`

https://docs.astral.sh/ruff/rules/lru-cache-with-maxsize-none/
  • Loading branch information
DimitriPapadopoulos committed Mar 11, 2024
1 parent 2d415d8 commit 038ec94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zarr/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import atexit
import errno
import functools
import glob
import multiprocessing
import operator
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 038ec94

Please sign in to comment.