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 3.
This commit is the next 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 improves the internal extensibility of @beartype's dynamic code generator by refactoring: * The current approach that laboriously passes `n` metadatum as hidden parameters to type-checking wrapper functions into... * A new approach that efficiently and trivially passes a single `BeartypeCheckMeta` dataclass instance as a hidden parameter to type-checking wrapper functions. Naturally, this instance encapsulates those `n` metadatum as instance variables. Naturally, I have no idea what I'm talking about. This is why coding and Friday nights is a volatile admixture at best. Frankly, it's best not to think too hard about any of this. (*Certainly certifiably friable!*)
- Loading branch information
Showing
25 changed files
with
367 additions
and
199 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
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
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
File renamed without changes.
Oops, something went wrong.