Skip to content

Maintenance and performance tweaks#2

Merged
sn merged 1 commit into
mainfrom
chore/fixing-bugs
May 16, 2026
Merged

Maintenance and performance tweaks#2
sn merged 1 commit into
mainfrom
chore/fixing-bugs

Conversation

@sn
Copy link
Copy Markdown
Contributor

@sn sn commented May 16, 2026

This pull request updates the nitro-dispatch plugin system to version 1.1.0, introducing several improvements and fixes. The most significant changes include stricter wildcard event matching, enhanced decorator safety, and improved plugin discovery and registration. Documentation and type annotations have also been clarified throughout the codebase.

Event Matching Improvements:

  • Wildcard event patterns now match only a single dot-delimited segment (e.g., user.* matches user.login but not user.profile.update), providing more predictable and precise event handling. [1] [2]

Decorator Safety and Testing:

  • The @hook decorator now raises a TypeError if stacked on the same method, preventing accidental multiple event subscriptions for a single handler. A corresponding test ensures this behavior. [1] [2]

Plugin Manager Enhancements:

  • The PluginManager.register method now returns the plugin's name, and plugin discovery uses this return value for accurate tracking. This change also avoids unnecessary instantiation of plugins during reloads, improving efficiency and correctness. [1] [2] [3] [4] [5] [6]

Documentation and Typing Updates:

  • Numerous docstrings have been clarified for consistency, including error strategy, event registration, and plugin discovery. Minor style and grammar corrections were applied for improved readability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Version Bump:

  • The package version is updated from 1.0.2 to 1.1.0 in both __init__.py and pyproject.toml. [1] [2]

@sn sn self-assigned this May 16, 2026
@sn sn merged commit fb299f5 into main May 16, 2026
6 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