Skip to content

Commit

Permalink
feat: remove methods from the bucket object (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks authored Oct 23, 2024
1 parent 25f6ace commit faa914d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions storage3/_async/file_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,15 +447,10 @@ def _get_final_path(self, path: str) -> str:
return f"{self.id}/{path}"


# this class is returned by methods that fetch buckets, for example StorageBucketAPI.get_bucket
# adding this mixin on the BaseBucket means that those bucket objects can also be used to
# run methods like `upload` and `download`
@dataclass(repr=False)
class AsyncBucket(BaseBucket, AsyncBucketActionsMixin):
class AsyncBucket(BaseBucket):
"""Represents a storage bucket."""

_client: AsyncClient = field(repr=False)


@dataclass
class AsyncBucketProxy(AsyncBucketActionsMixin):
Expand Down
7 changes: 1 addition & 6 deletions storage3/_sync/file_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,15 +445,10 @@ def _get_final_path(self, path: str) -> str:
return f"{self.id}/{path}"


# this class is returned by methods that fetch buckets, for example StorageBucketAPI.get_bucket
# adding this mixin on the BaseBucket means that those bucket objects can also be used to
# run methods like `upload` and `download`
@dataclass(repr=False)
class SyncBucket(BaseBucket, SyncBucketActionsMixin):
class SyncBucket(BaseBucket):
"""Represents a storage bucket."""

_client: SyncClient = field(repr=False)


@dataclass
class SyncBucketProxy(SyncBucketActionsMixin):
Expand Down

0 comments on commit faa914d

Please sign in to comment.