Skip to content

Improve how to get different types of DispatchInfo.target #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
llucax opened this issue Mar 27, 2025 · 0 comments
Open

Improve how to get different types of DispatchInfo.target #118

llucax opened this issue Mar 27, 2025 · 0 comments
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

Comments

@llucax
Copy link
Contributor

llucax commented Mar 27, 2025

What's needed?

It is difficult to use the current targets, defined as TargetComponents = list[int] | list[ComponentCategory], because the match statement (and isinstance() can't deal with containers, so we can check that something is a list but not that is a list[int]. We had issues in the past getting this right and we still do.

Proposed solution

Wait until this is implemented in the client:

And 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.

@llucax llucax added 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 labels Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant