소스 검색

One more in lru_cache.

Jelmer Vernooij 2 년 전
부모
커밋
ea8fcb760c
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      dulwich/lru_cache.py

+ 2 - 2
dulwich/lru_cache.py

@@ -63,12 +63,12 @@ class _LRUNode(Generic[K, V]):
             prev_key,
         )
 
-    def run_cleanup(self):
+    def run_cleanup(self) -> None:
         if self.cleanup is not None:
             self.cleanup(self.key, self.value)
         self.cleanup = None
         # Just make sure to break any refcycles, etc
-        self.value = None
+        del self.value
 
 
 class LRUCache(Generic[K, V]):