Skip to content

Commit ccdbe95

Browse files
authored
docs: Fix rendering of PutMode docstring (#645)
1 parent 8e2220e commit ccdbe95

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

obstore/python/obstore/_put.pyi

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,24 @@ class UpdateVersion(TypedDict, total=False):
4343
"""A version indicator for the newly created object."""
4444

4545
PutMode: TypeAlias = Literal["create", "overwrite"] | UpdateVersion
46-
"""Configure preconditions for the put operation
46+
"""Configure preconditions for the put operation.
47+
4748
There are three modes:
48-
- Overwrite: Perform an atomic write operation, overwriting any object present at the
49-
provided path.
50-
- Create: Perform an atomic write operation, returning
49+
50+
- **Overwrite**: Perform an atomic write operation, overwriting any object present at
51+
the provided path.
52+
- **Create**: Perform an atomic write operation, returning
5153
[`AlreadyExistsError`][obstore.exceptions.AlreadyExistsError] if an object already
5254
exists at the provided path.
53-
- Update: Perform an atomic write operation if the current version of the object matches
54-
the provided [`UpdateVersion`][obstore.UpdateVersion], returning
55+
- **Update**: Perform an atomic write operation if the current version of the object
56+
matches the provided [`UpdateVersion`][obstore.UpdateVersion], returning
5557
[`PreconditionError`][obstore.exceptions.PreconditionError] otherwise.
58+
5659
If a string is provided, it must be one of:
60+
5761
- `"overwrite"`
5862
- `"create"`
63+
5964
If a `dict` is provided, it must meet the criteria of
6065
[`UpdateVersion`][obstore.UpdateVersion].
6166

0 commit comments

Comments
 (0)