Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 14a1402

Browse files
committed
Use functools.lru_cache
1 parent c5735ea commit 14a1402

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from cmake_file_api.kinds.codemodel.api import CODEMODEL_API
1212

1313

14-
@functools.cache
14+
@functools.lru_cache(1) # FIXME: CPython 3.9 provides `functools.cache`
1515
def cmake_version():
1616
cmake_version_raw = subprocess.check_output(["cmake", "--version"], text=True)
1717
cmake_version_match = next(re.finditer(r"cmake version ((?:[0-9.]+.)[0-9.]+)", cmake_version_raw, flags=re.I))

0 commit comments

Comments
 (0)