mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-05-20 16:05:08 +00:00
Update _BaseCache to comply with python 3.8.x
This commit is contained in:
parent
8dd1b509ed
commit
ee4d1b59fc
1 changed files with 3 additions and 3 deletions
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections import deque, UserDict
|
from collections import deque
|
||||||
from typing import Any, Deque, Tuple, TypeVar
|
from typing import Any, Deque, Tuple, TypeVar, Dict
|
||||||
|
|
||||||
__all__: Tuple[str, ...] = ('ObjectCache',)
|
__all__: Tuple[str, ...] = ('ObjectCache',)
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ K = TypeVar('K')
|
||||||
V = TypeVar('V')
|
V = TypeVar('V')
|
||||||
|
|
||||||
|
|
||||||
class _BaseCache(UserDict[K, V]):
|
class _BaseCache(Dict[K, V]):
|
||||||
"""This is a rough implementation of an LRU Cache using a deque and a dict."""
|
"""This is a rough implementation of an LRU Cache using a deque and a dict."""
|
||||||
|
|
||||||
__slots__: Tuple[str, ...] = ('_max_size', '_lru_keys')
|
__slots__: Tuple[str, ...] = ('_max_size', '_lru_keys')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue