This commit is contained in:
long2ice
2024-07-24 22:24:30 +08:00
parent 701d83fec3
commit 5f985a8506
8 changed files with 2279 additions and 1520 deletions

View File

@@ -1,14 +1,6 @@
from importlib.metadata import version
from typing import ClassVar, Optional, Type
# Because this project supports python 3.7 and up, Pyright treats importlib as
# an external library and so needs to be told to ignore the type issues it sees.
try:
# Python 3.8+
from importlib.metadata import version # type: ignore
except ImportError:
# Python 3.7
from importlib_metadata import version # type: ignore
from fastapi_cache.coder import Coder, JsonCoder
from fastapi_cache.key_builder import default_key_builder
from fastapi_cache.types import Backend, KeyBuilder