Improve how to get different types of DispatchInfo.target
#118
Labels
part:actor
Affects the dispatching actor
priority:high
Address this as soon as possible
scope:breaking-change
Breaking change, users will need to update their code
status:blocked
Other issues must be resolved before this can be worked on
type:enhancement
New feature or enhancement visitble to users
What's needed?
It is difficult to use the current targets, defined as
TargetComponents = list[int] | list[ComponentCategory]
, because thematch
statement (andisinstance()
can't deal with containers, so we can check that something is alist
but not that is alist[int]
. We had issues in the past getting this right and we still do.Proposed solution
Wait until this is implemented in the client:
Dispatch.target
frequenz-client-dispatch-python#139And then use the same solution here.
Use cases
No response
Alternatives and workarounds
No response
Additional context
This is mostly a reminder that we should update this library and the
DispatchInfo
class after frequenz-floss/frequenz-client-dispatch-python#139 is merged and released.The text was updated successfully, but these errors were encountered: