Feat/allow passing answer from @on to @after hook#683
Open
OSkrk wants to merge 7 commits into
Open
Conversation
OSkrk
commented
Nov 26, 2024
astrand
suggested changes
Nov 26, 2024
astrand
left a comment
Contributor
There was a problem hiding this comment.
Thanks for working on this!
tropxy
reviewed
Dec 2, 2024
tropxy
suggested changes
Dec 2, 2024
Contributor
|
I don't have anything against this PR. I leave it up to the new maintainers to approve and merge it. I'll have a call with the new maintainers this Friday and I'll bring this PR to the table. |
…nse, fix enum - Refactor _handle_call to build kwargs dict and call handler() once (astrand/tropxy) - Rename injected kwarg on_response -> call_response (tropxy) - Document inject_response argument in after() docstring (tropxy) - Fix test to use snake_case Action.boot_notification (fixes failing CI)
astrand
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses the feature discussed here, allowing the response sent inside the @on to be passed to the @after hook for further processing (avoiding the use of temp variables). The feature enables the @after decorator to accept an
inject_responseparameter, which can be used to control whether the response from the_on_actionhandler is passed to the_after_actionhandler, and guarantees backwards compatibility.@OrangeTux , @tropxy, @HugoJP1, @mdwcrft would like to know you guy's feedback on this.