Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decorator closures accepting only
*args
.
This commit resolves an unexpected incompatibility between the `@beartype` decorator and decorator closures accepting only positional variadic arguments (i.e., `*args`), resolving issue #375 kindly submitted by bestest @beartype QA beastie @danielward27 (Daniel Ward). Doing so ensures that @beartype now properly type-checks decorator chains resembling: ```python from beartype import beartype from functools import wraps def my_decorator(fn): @wraps(fn) def wrapped(*args) -> int: return fn(*args) return wrapped @beartype @my_decorator def my_func(a: int): return a ``` @beartype: *someday it will behave as expected.* (*Illegitimate elliptics, mate!*)
- Loading branch information
Showing
10 changed files
with
285 additions
and
132 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
Oops, something went wrong.