-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
beartype.vale
error granularity x 1.
This commit is the first in a commit chain improving the granularity (i.e., specificity) of exception messages raised by high-level beartype validators synthesized from lower-level beartype validators (e.g., via overloaded set theoretic operators like `|`, `&`, and `~`), en-route to resolving issue #72 kindly submitted by the unwreckable type-hinting guru Derek Wan (@dycw). Specifically, this commit drafts and documents (but has yet to meaningfully implement) a new `BeartypeValidator.get_diagnosis()` getter method returning a detailed pretty-printed diagnosis of how any object either satisfies or fails to satisfy any validator. Unrelatedly, this commit also optimizes the runtime efficiency of our core `beartype._util.kind.utilkinddict.die_if_mappings_two_items_collide()` validation function and thus the `@beartype` decorator at decoration time. (*Unsung doom-brung looms caromed off the bottom rung!*)
- Loading branch information
Showing
3 changed files
with
102 additions
and
45 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