What's needed?
We need to be consistent between the Dispatch and DispatchInfo classes. Dispatch uses target for the target components, and it makes sense, because it can also be categories. DispatchInfo should use the same.
Proposed solution
Rename DispatchInfo.components to DispatchInfo.target.
Additional context
|
class DispatchInfo: |
|
"""Event emitted when the dispatch changes.""" |
|
|
|
components: TargetComponents |
|
"""Components to be used.""" |
|
|
|
dry_run: bool |
|
"""Whether this is a dry run.""" |
|
|
|
options: dict[str, Any] |
|
"""Additional options.""" |
What's needed?
We need to be consistent between the
DispatchandDispatchInfoclasses.Dispatchusestargetfor the target components, and it makes sense, because it can also be categories.DispatchInfoshould use the same.Proposed solution
Rename
DispatchInfo.componentstoDispatchInfo.target.Additional context
frequenz-dispatch-python/src/frequenz/dispatch/_actor_dispatcher.py
Lines 23 to 33 in ecaca06