Skip to content

Commit aa0b6f0

Browse files
authored
Replace lru_cache with functools.cache (#18337)
Python 3.9 added `functools.cache` which can replace `lru_cache(maxsize=None)`. https://docs.python.org/3/library/functools.html#functools.cache
1 parent 624e179 commit aa0b6f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/modulefinder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ def default_lib_path(
751751
return path
752752

753753

754-
@functools.lru_cache(maxsize=None)
754+
@functools.cache
755755
def get_search_dirs(python_executable: str | None) -> tuple[list[str], list[str]]:
756756
"""Find package directories for given python. Guaranteed to return absolute paths.
757757

0 commit comments

Comments
 (0)