Skip to content

How to create custom action sets without custom_actions parameter?Β #365

@imenelydiaker

Description

@imenelydiaker

custom_actions is commented in HighlevelActionSetArgs:

class HighLevelActionSetArgs(DataClassJsonMixin):
subsets: tuple[HighLevelActionSet.ActionSubset] = field(
metadata=config(
encoder=lambda x: list(x),
decoder=lambda x: tuple(x),
),
)
# custom_actions: list[callable] | None # non-serializable argument, not supported
multiaction: bool = False

But is needed to create a custom action set:

elif subset == "custom":
if not custom_actions:
raise ValueError(
"'custom' is in 'action_subsets' but 'custom_actions' is empty."
)
allowed_actions.extend(custom_actions)

What's the alternative to create custom action sets if not using the "custom" value for subsets ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions