Skip to content

Commit 8b2d3cf

Browse files
Improve docstring of BucketStructure
1 parent 65f35bf commit 8b2d3cf

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

b2sdk/bucket.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,17 @@ class ValueNotSet:
6060

6161

6262
class BucketStructure(metaclass=B2TraceMeta):
63-
"""Structure holding all attributes of a bucket."""
63+
"""
64+
Structure holding all attributes of a bucket.
65+
66+
This structure doesn't hold reference to B2Api, so unlike `Bucket` class
67+
it cannot be used to perform any actions. Instead, this class is used
68+
to only hold Bucket's fields for serializing / deserializing.
69+
70+
Also important difference from `Bucket` is that this structure
71+
allows storing subset of fields, setting others to `ValueNotSet`,
72+
which preserves from serializing too much information.
73+
"""
6474

6575
id_: Union[str, ValueNotSet]
6676
account_id: Union[str, ValueNotSet]

0 commit comments

Comments
 (0)