Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EventListener.handler behavior #1260

Merged
merged 11 commits into from
Oct 15, 2024
Merged

Update EventListener.handler behavior #1260

merged 11 commits into from
Oct 15, 2024

Conversation

vachillo
Copy link
Member

@vachillo vachillo commented Oct 15, 2024

Describe your changes

  • BREAKING: Parameter driver on EventListener to event_listener_driver.
  • BREAKING: EventListener.handler return value behavior. If EventListener.handler returns None, the event will not be published to the event_listener_driver.
  • EventListener.handler return type to Optional[BaseEvent | dict].

Issue ticket number and link

closes #1130


📚 Documentation preview 📚: https://griptape--1260.org.readthedocs.build//1260/

@vachillo vachillo marked this pull request as ready for review October 15, 2024 18:06
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Member

@collindutter collindutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Can you please add a section to events.md showing this behavior?

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@collindutter collindutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved but looks like there are some doc failures from mismatched docstrings.

collindutter
collindutter previously approved these changes Oct 15, 2024
collindutter
collindutter previously approved these changes Oct 15, 2024
@vachillo vachillo merged commit f6b15ab into dev Oct 15, 2024
15 checks passed
@vachillo vachillo deleted the event_listener branch October 15, 2024 20:42
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.

Signal EventListener to drop an event from the handler method
2 participants