Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@bearytype
+ __call__()
+ __wrapped__
x 1.
This commit is the first in a commit chain generalizing the `@beartype` decorator to support **pseudo-callable wrapper objects** (i.e., objects defining both the `__call__()` and `__wrapped__` dunder attributes), en-route to resolving feature request #368 kindly submitted by @danielward27 (Daniel Ward). Specifically, this commit generalizes internal logic detecting and unwrapping **isomorphic wrappers** (i.e., callables whose signatures resemble `@wraps(...) def isomorphic_wrapper(*args, **kwargs): ...`) to unwrap a different callable object than the object detected for isomorphism. Frankly, it's best not to think too hard about any of this. (*Uncallable carbuncle!*)
- Loading branch information
Showing
7 changed files
with
436 additions
and
89 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.