summaryrefslogtreecommitdiff
path: root/requests_cache/backends/__init__.py
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook.git@proton.me>2022-12-11 22:28:55 -0600
committerJordan Cook <jordan.cook.git@proton.me>2022-12-13 16:27:49 -0600
commitf7281895698f33b9c41239b5be3a961fd1691b99 (patch)
tree233d6439c5f5a9b770a4206aed8fbe26e60d3a94 /requests_cache/backends/__init__.py
parentca26b146592e08ff237cf9b6cccdba56eb2af484 (diff)
downloadrequests-cache-f7281895698f33b9c41239b5be3a961fd1691b99.tar.gz
Update type hints to appease Pylance and stricter mypy settings
Diffstat (limited to 'requests_cache/backends/__init__.py')
-rw-r--r--requests_cache/backends/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/requests_cache/backends/__init__.py b/requests_cache/backends/__init__.py
index 9dd206a..d916ab8 100644
--- a/requests_cache/backends/__init__.py
+++ b/requests_cache/backends/__init__.py
@@ -56,7 +56,9 @@ BACKEND_CLASSES = {
}
-def init_backend(cache_name: str, backend: BackendSpecifier = None, **kwargs) -> BaseCache:
+def init_backend(
+ cache_name: str, backend: Optional[BackendSpecifier] = None, **kwargs
+) -> BaseCache:
"""Initialize a backend from a name, class, or instance"""
logger.debug(f'Initializing backend: {backend} {cache_name}')