simplebench.reporters.protocols.choice_protocol module🔗

Protocols for Choice-like objects.

class simplebench.reporters.protocols.choice_protocol.ChoiceProtocol(*args, **kwargs)[source]🔗

Bases: Protocol

A protocol defining the essential attributes for a Choice-like object.

This ensures that any object used within a generic Choices collection has the necessary name and flags attributes for indexing and management.

property flags: Iterable[str]🔗

An iterable of unique string flags (e.g., --my-flag) for the choice.

Returns:

An iterable of flags.

Return type:

Iterable[str]

property name: str🔗

The unique name of the choice, used as a key.

Returns:

The name of the choice.

Return type:

str