Skip to content

feat: add return types to invoke_hook#707

Draft
jakelorocco wants to merge 1 commit intomainfrom
jal/hook-typing
Draft

feat: add return types to invoke_hook#707
jakelorocco wants to merge 1 commit intomainfrom
jal/hook-typing

Conversation

@jakelorocco
Copy link
Contributor

@jakelorocco jakelorocco commented Mar 19, 2026

Misc PR

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

  • Link to Issue: Fixes N/A

Adds return types based on input payload. Removes some type hinting errors that were at hook invocation sites when replacing values with values from the hooks.

Assumes input payload type == output payload type.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code as added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

@github-actions
Copy link
Contributor

The PR description has been updated. Please fill out the template for your PR to be reviewed.

@mergify
Copy link

mergify bot commented Mar 19, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|release)(?:\(.+\))?:

@jakelorocco
Copy link
Contributor Author

@araujof, when you are back, can you please take a look at this? It's a low priority PR to make hooks a bit more ergonomic to work with in Mellea. I opted for a type var instead of overloading the different payload types so that it's automatically extensible in the future; this assumes that input payload == output payload type.

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