Skip to content

Commit

Permalink
fix: remove client property from Bucket instances
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks committed Oct 24, 2024
1 parent 227e57a commit 1ab75db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions storage3/_async/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions storage3/_sync/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down

0 comments on commit 1ab75db

Please sign in to comment.