From a42124a59d6a258057b6ad6265d41d0ba92df623 Mon Sep 17 00:00:00 2001 From: Rohan R Bharadwaj Date: Thu, 11 Nov 2021 00:34:33 +0530 Subject: [PATCH 1/2] Update least_recently_used.py --- other/least_recently_used.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/other/least_recently_used.py b/other/least_recently_used.py index d0e27efc6dc8..302a06c1fd3b 100644 --- a/other/least_recently_used.py +++ b/other/least_recently_used.py @@ -1,16 +1,17 @@ import sys -from abc import abstractmethod +from abc import ABCMeta from collections import deque class LRUCache: """Page Replacement Algorithm, Least Recently Used (LRU) Caching.""" + __metaclass__ = ABCMeta + dq_store = object() # Cache store of keys key_reference_map = object() # References of the keys in cache _MAX_CAPACITY: int = 10 # Maximum capacity of cache - @abstractmethod def __init__(self, n: int): """Creates an empty store and map for the keys. The LRUCache is set the size n. From e8a24c53c9359621ff313543ee301fff08512b29 Mon Sep 17 00:00:00 2001 From: Rohan R Bharadwaj Date: Thu, 11 Nov 2021 00:35:01 +0530 Subject: [PATCH 2/2] Update mypy.ini --- mypy.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy.ini b/mypy.ini index f00b3eeb6bac..927ad0f89586 100644 --- a/mypy.ini +++ b/mypy.ini @@ -2,4 +2,4 @@ ignore_missing_imports = True install_types = True non_interactive = True -exclude = (other/least_recently_used.py|other/lfu_cache.py|other/lru_cache.py) +exclude = (other/lfu_cache.py|other/lru_cache.py)