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

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

UP033 [*] Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`
  --> UP033_1.py:15:11
   |
15 | @lru_cache(maxsize=None)
   |           ^^^^^^^^^^^^^^
16 | @other_decorator
17 | def fixme():
   |
help: Rewrite with `@functools.cache
   |
   - from functools import lru_cache
1  + from functools import lru_cache, cache
2  |
--------------------------------------------------------------------------------
14 |
   - @lru_cache(maxsize=None)
15 + @cache
16 | @other_decorator
   |
