From 9ba5656ad842fcd12a88730a8d38cf3f177b66f0 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Thu, 14 Oct 2021 23:36:04 -0700 Subject: [PATCH] Update backports.functools-lru-cache-1.6.4 --- lib/backports/functools_lru_cache.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/backports/functools_lru_cache.py b/lib/backports/functools_lru_cache.py index e0b19d95..8be4515f 100644 --- a/lib/backports/functools_lru_cache.py +++ b/lib/backports/functools_lru_cache.py @@ -4,7 +4,7 @@ import functools from collections import namedtuple from threading import RLock -_CacheInfo = namedtuple("CacheInfo", ["hits", "misses", "maxsize", "currsize"]) +_CacheInfo = namedtuple("_CacheInfo", ["hits", "misses", "maxsize", "currsize"]) @functools.wraps(functools.update_wrapper) @@ -63,7 +63,7 @@ def _make_key( return _HashedSeq(key) -def lru_cache(maxsize=100, typed=False): +def lru_cache(maxsize=100, typed=False): # noqa: C901 """Least-recently-used cache decorator. If *maxsize* is set to None, the LRU features are disabled and the cache @@ -136,7 +136,7 @@ def lru_cache(maxsize=100, typed=False): if link is not None: # record recent use of the key by moving it # to the front of the list - root, = nonlocal_root + (root,) = nonlocal_root link_prev, link_next, key, result = link link_prev[NEXT] = link_next link_next[PREV] = link_prev @@ -148,7 +148,7 @@ def lru_cache(maxsize=100, typed=False): return result result = user_function(*args, **kwds) with lock: - root, = nonlocal_root + (root,) = nonlocal_root if key in cache: # getting here means that this same key was added to the # cache while the lock was released. since the link