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"`.
This commit is contained in:
Martijn Pieters
2023-04-28 14:40:31 +01:00
parent 550ba76df4
commit 416a4ec850

View File

@@ -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