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

Return none in after event #82

Merged
merged 2 commits into from
Nov 9, 2021
Merged

Return none in after event #82

merged 2 commits into from
Nov 9, 2021

Conversation

da-h
Copy link
Owner

@da-h da-h commented Nov 9, 2021

Bugfix: Returinng None is not possible with after-events

Description

This MR fixes #80 by specifying internally if the eventCall object given to the before/after-events get a return-value from the actual event.
Before this MR, returning None was not possible in an event, when also registering an after-event, as that value was used internally to determine whether the eventCall-object is constructed with or without a return value in the event call stack.

Things done in this MR

  • Added a helper-class no_result_given that gets overwritten any time an actual event (in contrast to a hook) gets called.

Check all before creating this PR:

  • unit tests adapted / created

David Hartmann added 2 commits November 9, 2021 15:30
@da-h da-h force-pushed the return_none_in_after_event branch from f0e45b8 to a59bf8d Compare November 9, 2021 14:30
@da-h da-h merged commit 88692bb into master Nov 9, 2021
@da-h da-h deleted the return_none_in_after_event branch November 9, 2021 14:32
@da-h da-h linked an issue Nov 9, 2021 that may be closed by this pull request
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.

Not able to return None with after-events after_event not working properly
1 participant