Skip to content

Commit

Permalink
@functools.lru_cache() → @functools.lru_cache
Browse files Browse the repository at this point in the history
Starting with Python ≥ 3.8, lru_cache can be used as a straight
decorator with no arguments:

https://bugs.python.org/issue36772

This is a suggestion from pyupgrade:
https://github.com/asottile/pyupgrade#remove-parentheses-from-functoolslru_cache
  • Loading branch information
DimitriPapadopoulos authored and abravalheri committed Nov 20, 2023
1 parent 7a85110 commit 3aec0a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/build_launchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def build_cmake_project_with_msbuild(build_arena, msbuild_parameters):
subprocess.check_call(cmd, cwd=build_arena)


@functools.lru_cache()
@functools.lru_cache
def get_cmake():
"""Find CMake using registry."""
import winreg
Expand All @@ -96,7 +96,7 @@ def get_cmake():
return root / 'bin\\CMake.exe'


@functools.lru_cache()
@functools.lru_cache
def get_msbuild():
"""Use VSWhere to find MSBuild."""
vswhere = pathlib.Path(
Expand Down

0 comments on commit 3aec0a3

Please sign in to comment.