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 4.
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 continues improving 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. (*Externalize the magnetic magma in a diegetic exegesis!*)
- Loading branch information
Showing
29 changed files
with
433 additions
and
322 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
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.