Skip to content

Commit 8537c7e

Browse files
committed
docs: Fix the update() docstring
`update()` raises `ValueError` for any key that is not an updatable field, not only for `type` and `dry_run`. Also fixes a "preceeded" typo. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
1 parent b19f36b commit 8537c7e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/frequenz/client/dispatch/_client.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ async def update( # pylint: disable=too-many-branches
382382
The `new_fields` argument is a dictionary of fields to update. The keys are
383383
the field names, and the values are the new values for the fields.
384384
385-
For recurrence fields, the keys are preceeded by "recurrence.".
385+
For recurrence fields, the keys are preceded by "recurrence.".
386386
387387
Note that updating `type` and `dry_run` is not supported.
388388
@@ -395,7 +395,8 @@ async def update( # pylint: disable=too-many-branches
395395
Dispatch: The updated dispatch.
396396
397397
Raises:
398-
ValueError: If updating `type` or `dry_run`.
398+
ValueError: If `new_fields` contains a key that is not an updatable
399+
field, which includes `type` and `dry_run`.
399400
"""
400401
msg = UpdateMicrogridDispatchRequest(
401402
dispatch_id=int(dispatch_id), microgrid_id=int(microgrid_id)

0 commit comments

Comments
 (0)