-
-
Notifications
You must be signed in to change notification settings - Fork 946
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
** BREAKING CHANGE ** This adds typing information for the before hook as a proof of concept. I used ParamSpec as a means to introspect the hooks arguments to type check the *args and **kwargs arguments. A problem with using ParamSpec is that additional arguments to the before decorator become impossible (so far as I can see) to specify a type. is_async, in needs to come after the positional args, but that is not allowed with ParamSpec. The solution to this is to move is_async to be consumed through **kwargs and no longer a special keyword argument. I don't think this is actually a breaking change, but because it changes a signature it might be worth marking it as such.
- Loading branch information
Showing
3 changed files
with
71 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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