From 1ab75db40857b610f480e215b907b2d1c6e4b799 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Thu, 24 Oct 2024 21:10:23 +0000 Subject: [PATCH] fix: remove client property from Bucket instances --- storage3/_async/bucket.py | 4 ++-- storage3/_sync/bucket.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/storage3/_async/bucket.py b/storage3/_async/bucket.py index 187f82b7..1dccdb90 100644 --- a/storage3/_async/bucket.py +++ b/storage3/_async/bucket.py @@ -37,7 +37,7 @@ async def list_buckets(self) -> list[AsyncBucket]: """Retrieves the details of all storage buckets within an existing product.""" # if the request doesn't error, it is assured to return a list res = await self._request("GET", "/bucket") - return [AsyncBucket(**bucket, _client=self._client) for bucket in res.json()] + return [AsyncBucket(**bucket) for bucket in res.json()] async def get_bucket(self, id: str) -> AsyncBucket: """Retrieves the details of an existing storage bucket. @@ -49,7 +49,7 @@ async def get_bucket(self, id: str) -> AsyncBucket: """ res = await self._request("GET", f"/bucket/{id}") json = res.json() - return AsyncBucket(**json, _client=self._client) + return AsyncBucket(**json) async def create_bucket( self, diff --git a/storage3/_sync/bucket.py b/storage3/_sync/bucket.py index 5780776c..f8247eeb 100644 --- a/storage3/_sync/bucket.py +++ b/storage3/_sync/bucket.py @@ -37,7 +37,7 @@ def list_buckets(self) -> list[SyncBucket]: """Retrieves the details of all storage buckets within an existing product.""" # if the request doesn't error, it is assured to return a list res = self._request("GET", "/bucket") - return [SyncBucket(**bucket, _client=self._client) for bucket in res.json()] + return [SyncBucket(**bucket) for bucket in res.json()] def get_bucket(self, id: str) -> SyncBucket: """Retrieves the details of an existing storage bucket. @@ -49,7 +49,7 @@ def get_bucket(self, id: str) -> SyncBucket: """ res = self._request("GET", f"/bucket/{id}") json = res.json() - return SyncBucket(**json, _client=self._client) + return SyncBucket(**json) def create_bucket( self,