From c89fc88f5e4fca281a2d43b1f925924c3bb181cc Mon Sep 17 00:00:00 2001 From: Karim shoair Date: Mon, 14 Oct 2024 00:37:15 +0300 Subject: [PATCH] Another Compatibility fix for Python 3.7 because I deserve --- scrapling/storage_adaptors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scrapling/storage_adaptors.py b/scrapling/storage_adaptors.py index da370ae..ec88925 100644 --- a/scrapling/storage_adaptors.py +++ b/scrapling/storage_adaptors.py @@ -20,7 +20,7 @@ def __init__(self, url: Union[str, None] = None): """ self.url = url - @cache + @cache(None, typed=True) def _get_base_url(self, default_value: str = 'default') -> str: if not self.url or type(self.url) is not str: return default_value @@ -52,7 +52,7 @@ def retrieve(self, identifier: str) -> Optional[Dict]: raise NotImplementedError('Storage system must implement `save` method') @staticmethod - @cache + @cache(None, typed=True) def _get_hash(identifier: str) -> str: """If you want to hash identifier in your storage system, use this safer""" identifier = identifier.lower().strip()