Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

## New Features

* Changed `target_components`, `dispatch_ids`, and `filter_queries` parameters from `Iterator` to `Iterable` in `list` method for better API usability
* Added support for `dispatch_ids` and `queries` filters in the `list` method
- `dispatch_ids` parameter allows filtering by specific dispatch IDs
- `filter_queries` parameter supports text-based filtering on dispatch `id` and `type` fields
Expand All @@ -18,4 +19,3 @@
* Date-only inputs in CLI timestamps now default to midnight UTC instead of using the current time.

## Bug Fixes

8 changes: 4 additions & 4 deletions src/frequenz/client/dispatch/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import warnings
from datetime import datetime, timedelta
from typing import Any, AsyncIterator, Awaitable, Iterator, Literal, cast
from typing import Any, AsyncIterator, Awaitable, Iterable, Iterator, Literal, cast

# pylint: disable-next=no-name-in-module
from frequenz.api.common.v1alpha8.pagination.pagination_params_pb2 import (
Expand Down Expand Up @@ -138,15 +138,15 @@ async def list(
self,
microgrid_id: MicrogridId,
*,
target_components: Iterator[TargetComponents] = iter(()),
target_components: Iterable[TargetComponents] = (),
start_from: datetime | None = None,
start_to: datetime | None = None,
end_from: datetime | None = None,
end_to: datetime | None = None,
active: bool | None = None,
dry_run: bool | None = None,
dispatch_ids: Iterator[DispatchId] = iter(()),
filter_queries: Iterator[str] = iter(()),
dispatch_ids: Iterable[DispatchId] = (),
filter_queries: Iterable[str] = (),
page_size: int | None = None,
) -> AsyncIterator[Iterator[Dispatch]]:
"""List dispatches.
Expand Down