-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit generalizes the `@beartype` decorator to reluctantly acknowledge the existence of horrifying wrapper expressions that pass types rather than callables to the standard `@functool.wraps` decorator (e.g., `@functool.wraps(list)`), resolving issue #339 kindly submitted by the indomitable and fierce of heart @sylvorg. Previously, `@beartype` raised unreadable exceptions when confronted with this profane edge case. Now, `@beartype` turns a blind eye to the special darkness in your codebase by silently ignoring *all* wrapped objects that are not pure-Python callables. **K-k-k-killer Combo!!** (*Insane inanities!*)
- Loading branch information
Showing
2 changed files
with
81 additions
and
8 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