(maxsize=128, typed=False, copy=False)
| 48 | # this is enough with copy.copy taken from |
| 49 | # https://stackoverflow.com/questions/54909357 |
| 50 | def lru_cache(maxsize=128, typed=False, copy=False): |
| 51 | if not copy: |
| 52 | return functools.lru_cache(maxsize, typed) |
| 53 | |
| 54 | def decorator(f): |
| 55 | cached_func = functools.lru_cache(maxsize, typed)(f) |
| 56 | |
| 57 | @functools.wraps(f) |
| 58 | def wrapper(*args, **kwargs): |
| 59 | # return copymod.deepcopy(cached_func(*args, **kwargs)) |
| 60 | return copymod.copy(cached_func(*args, **kwargs)) |
| 61 | |
| 62 | return wrapper |
| 63 | |
| 64 | return decorator |
| 65 | |
| 66 | |
| 67 | @lru_cache(maxsize=2048) |
nothing calls this directly
no outgoing calls
no test coverage detected