Skip to content

0.0.20 - #24

Merged
pomponchik merged 14 commits into
mainfrom
develop
Jun 26, 2026
Merged

0.0.20#24
pomponchik merged 14 commits into
mainfrom
develop

Conversation

@pomponchik

@pomponchik pomponchik commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

A new dynamic attribute, .one, was added to slots and slot selections; it contains a selection of exactly one plugin. Accessing it will raise an exception if there is more than one plugin in the slot or selection.

This feature is very similar to how things used to be done:

selection = some_slot[‘plugin_name’]

if not selection:
    raise SomeError(‘I need some plugin, sorry.’)

if len(selection) > 1:
    raise SomeError(‘I need only one plugin!’)

selection()

Now, the complete equivalent of the code above would look like this:

some_slot[‘plugin_name’].one()

@pomponchik
pomponchik merged commit 78b5cea into main Jun 26, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant