2121
2222Author: Samuel Guo (64931063+rf20008@users.noreply.github.com)
2323"""
24- from abc import ABC , abstractmethod
24+ from abc import ABC
2525import typing
26- from typing import List
27- import warnings
2826import orjson
2927import asyncio
30- from ...FileDictionaryReader import AsyncFileDict
31- from ..appeal import Appeal , AppealViewInfo
32- from ..base_problem import BaseProblem
33- from ..dict_convertible import DictConvertible , IdentifiableDictConvertible
28+ from helpful_modules .FileDictionaryReader import AsyncFileDict
29+ from helpful_modules .problems_module .dict_convertible import DictConvertible , IdentifiableDictConvertible
3430from redis import asyncio as aioredis # type: ignore
35- from ..errors import (
36- FormatException ,
37- SQLNotSupportedInRedisException , ThingNotFound ,
38- CorruptedDataException , OwnershipNotDeterminableException
31+ from helpful_modules .problems_module .errors import (
32+ SQLNotSupportedInRedisException ,
33+ ThingNotFound ,
34+ CorruptedDataException ,
35+ OwnershipNotDeterminableException
3936)
40- from ..GuildData import GuildData
41- from ..quizzes import Quiz
42- from ..user_data import UserData
43- from ..verification_code_info import VerificationCodeInfo
4437from ..AbstractKVCache import AbstractKVBasedCache , PREFIX_REGISTRY
4538from ..cache_ABC import TYPE_ERROR_NOT_FOUND
4639MUST_IMPLEMENT_ERROR = NotImplementedError ("Subclasses must implement this" )
@@ -87,7 +80,6 @@ def __init__(self, redis_url: str, password: str) -> None:
8780 self .lock = asyncio .Lock ()
8881
8982
90- @abstractmethod
9183 async def get_all_things (self ) -> list [IdentifiableDictConvertible ]:
9284 """Return a list of EVERYTHING in the database"""
9385 return [value for key , value in await self .items ()]
@@ -372,4 +364,4 @@ async def initialize_sql_table(self):
372364 "SQL is not supported in Redis, and creating sql tables is not supported in Redis either"
373365 )
374366if __name__ == "__main__" :
375- r = RedisCache2 ()
367+ g r = RedisCache2 ()
0 commit comments