From 416a4ec850d42ea82c47d4bd0e8a326e48e7f462 Mon Sep 17 00:00:00 2001 From: Martijn Pieters Date: Fri, 28 Apr 2023 14:40:31 +0100 Subject: [PATCH] Explicitly list what names are exported This signals to automated tools what names usually can be imported from the package, as otherwise you'd get warnings like `"default_key_builder" is not exported from module "fastapi_cache"`. --- fastapi_cache/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fastapi_cache/__init__.py b/fastapi_cache/__init__.py index 2393916..e21e4b7 100644 --- a/fastapi_cache/__init__.py +++ b/fastapi_cache/__init__.py @@ -6,6 +6,16 @@ from fastapi_cache.key_builder import default_key_builder from fastapi_cache.types import KeyBuilder +__all__ = [ + "Backend", + "Coder", + "FastAPICache", + "JsonCoder", + "KeyBuilder", + "default_key_builder", +] + + class FastAPICache: _backend: ClassVar[Optional[Backend]] = None _prefix: ClassVar[Optional[str]] = None