-
-
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.
Unsubscripted
typing.Literal
validation.
This commit validates that PEP 586-compliant `typing.Literal` type hints *must* be subscripted by one or more literal objects, resolving rapid-action issue #359 kindly submitted by "Computer Graphics and Visualization" sufferer @sylvorg, who graciously sacrificed his entire undergraduate GPA for the gradual betterment of @beartype. Your journey of woe and hardship will *not* be forgotten, @sylvorg! Specifically, @beartype now raises the following human-readable exception when you attempt to use the unsubscripted `typing.Literal` type hint factory as a type hint: ``` beartype.roar.BeartypeDecorHintPep586Exception: Is_bearable() PEP 586 type hint typing.Literal unsubscripted (i.e., subscripted by no literal objects). ``` This is why we @beartype. For @sylvorg and for scholastic ~~pain~~ learning! (*Fun, fun in the @beartype sun!*)
- Loading branch information
Showing
4 changed files
with
147 additions
and
139 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
Oops, something went wrong.