diff --git a/pyinfra/storage/adapters/azure.py b/pyinfra/storage/adapters/azure.py index 1162e51..04a8ca8 100644 --- a/pyinfra/storage/adapters/azure.py +++ b/pyinfra/storage/adapters/azure.py @@ -12,9 +12,7 @@ logging.getLogger("urllib3").setLevel(logging.WARNING) def _retry(exceptions=Exception): - def inner(func): - @retry(exceptions=exceptions, delay=5, jitter=(0, 3), max_delay=60) @wraps(func) def inner(*args, **kwargs): @@ -26,7 +24,6 @@ def _retry(exceptions=Exception): class AzureStorageAdapter(StorageAdapter): - def __init__(self, client): super().__init__(client=client) self.__client: BlobServiceClient = self._StorageAdapter__client diff --git a/pyinfra/storage/adapters/s3.py b/pyinfra/storage/adapters/s3.py index bbf15bf..f6bc110 100644 --- a/pyinfra/storage/adapters/s3.py +++ b/pyinfra/storage/adapters/s3.py @@ -7,8 +7,8 @@ from pyinfra.storage.adapters.adapter import StorageAdapter logger = logging.getLogger(__name__) -class S3StorageAdapter(StorageAdapter): +class S3StorageAdapter(StorageAdapter): def __init__(self, client): super().__init__(client=client) self.__client: Minio = self._StorageAdapter__client diff --git a/pyinfra/storage/storage.py b/pyinfra/storage/storage.py index b363aa3..317da6e 100644 --- a/pyinfra/storage/storage.py +++ b/pyinfra/storage/storage.py @@ -21,34 +21,6 @@ class Storage: return self.__adapter.clear_bucket(bucket_name) - - - - - - - - - - - - - - - - - - - - - - - - - - - - # import abc # import gzip # import logging diff --git a/pyinfra/storage/storages.py b/pyinfra/storage/storages.py index 50b2b6b..8d194f4 100644 --- a/pyinfra/storage/storages.py +++ b/pyinfra/storage/storages.py @@ -11,4 +11,4 @@ def get_azure_storage(config=None): def get_s3_storage(config=None): - return Storage(S3StorageAdapter(get_s3_client(config))) \ No newline at end of file + return Storage(S3StorageAdapter(get_s3_client(config))) diff --git a/pyinfra/test/unit_tests/storage_test.py b/pyinfra/test/unit_tests/storage_test.py index 456d40c..b892c45 100644 --- a/pyinfra/test/unit_tests/storage_test.py +++ b/pyinfra/test/unit_tests/storage_test.py @@ -58,8 +58,8 @@ def storage(client_name, bucket_name, request): def test_get_azure_storage_yields_storage(): - assert isinstance(get_azure_storage(), Storage) + assert isinstance(get_azure_storage(), Storage) def test_get_s3_storage_yields_storage(): - assert isinstance(get_s3_storage(), Storage) + assert isinstance(get_s3_storage(), Storage)