Skip to content

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

Description

@llucax

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:actorAffects the dispatching actorpriority:highAddress this as soon as possiblescope:breaking-changeBreaking change, users will need to update their codestatus:blockedOther issues must be resolved before this can be worked ontype:enhancementNew feature or enhancement visitble to users

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions