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

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

UP033 [*] Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`
  --> UP033_0.py:15:21
   |
15 | @functools.lru_cache(maxsize=None)
   |                     ^^^^^^^^^^^^^^
16 | @other_decorator
17 | def fixme():
   |
help: Rewrite with `@functools.cache
   |
14 |
   - @functools.lru_cache(maxsize=None)
15 + @functools.cache
16 | @other_decorator
   |

UP033 [*] Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`
  --> UP033_0.py:50:21
   |
50 |   @functools.lru_cache(
   |  _____________________^
51 | |     maxsize=None,  # text
52 | | )
   | |_^
53 |   def fixme_unsafe():
54 |       pass
   |
help: Rewrite with `@functools.cache
   |
49 |
   - @functools.lru_cache(
   -     maxsize=None,  # text
   - )
50 + @functools.cache
51 | def fixme_unsafe():
   |
note: This is an unsafe fix and may change runtime behavior
