---
source: crates/ruff_linter/src/rules/pyupgrade/mod.rs
---
UP033_1.py:4:11: UP033 [*] Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`
  |
4 | @lru_cache(maxsize=None)
  |           ^^^^^^^^^^^^^^ UP033
5 | def fixme():
6 |     pass
  |
  = help: Rewrite with `@functools.cache

ℹ Safe fix
1   |-from functools import lru_cache
  1 |+from functools import lru_cache, cache
2 2 | 
3 3 | 
4   |-@lru_cache(maxsize=None)
  4 |+@cache
5 5 | def fixme():
6 6 |     pass
7 7 | 

UP033_1.py:10:11: UP033 [*] Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`
   |
 9 | @other_decorator
10 | @lru_cache(maxsize=None)
   |           ^^^^^^^^^^^^^^ UP033
11 | def fixme():
12 |     pass
   |
   = help: Rewrite with `@functools.cache

ℹ Safe fix
1     |-from functools import lru_cache
   1  |+from functools import lru_cache, cache
2  2  | 
3  3  | 
4  4  | @lru_cache(maxsize=None)
--------------------------------------------------------------------------------
7  7  | 
8  8  | 
9  9  | @other_decorator
10    |-@lru_cache(maxsize=None)
   10 |+@cache
11 11 | def fixme():
12 12 |     pass
13 13 | 

UP033_1.py:15:11: UP033 [*] Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`
   |
15 | @lru_cache(maxsize=None)
   |           ^^^^^^^^^^^^^^ UP033
16 | @other_decorator
17 | def fixme():
   |
   = help: Rewrite with `@functools.cache

ℹ Safe fix
1     |-from functools import lru_cache
   1  |+from functools import lru_cache, cache
2  2  | 
3  3  | 
4  4  | @lru_cache(maxsize=None)
--------------------------------------------------------------------------------
12 12 |     pass
13 13 | 
14 14 | 
15    |-@lru_cache(maxsize=None)
   15 |+@cache
16 16 | @other_decorator
17 17 | def fixme():
18 18 |     pass


