-
-
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.
PEP 563 + PEP 604 union + undefined types.
This commit generalizes @beartype to support an edge case with respect to PEPs 557, 563, and 604, resolving issue #342 kindly submitted by yeasty VimScript bioinformatics guru @brettc (Brett Calcott). Specifically, this commit resolves an issue arising from which enabling PEP 563 via from `__future__ import annotations`, defining a PEP 604 union over multiple undefined types, and then annotating a PEP 557 `@dataclass` with that union. We *did* say edge case, didn't we? Unsurprisingly, this was surprisingly non-trivial. This is why you just lets @beartype do the heavy lifting. (*Heavy levy!*)
- Loading branch information
Showing
14 changed files
with
554 additions
and
243 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
Oops, something went wrong.