-
-
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 adds support for **ignorable PEP 695-compliant `type` aliases** (e.g., `type this_is_horrible = object`, `type this_is_even_worse = int | str | Any`), resolving a future issue that somebody was surely about to submit. Relatedly, this commit also significantly optimizes @beartype's internal detection of ignorable type hints. Previously, that detection inefficiently operated in `O(n)` time for `n` the number of PEP-specific detection routines; since the number of PEPs supported by @beartype has blossomed out of control (...*a good thing, mostly*), so too has the number of PEP-specific detection routines and thus @beartype's internal detection of ignorable type hints. Now, that detection efficiently operates in `O(1)` time. Since @beartype repeatedly performed that detection during dynamic code generation, this constitutes a significant decorator-time optimization. (*Formidably hearty formulations of Romulan LAN parties!*)
- Loading branch information
Showing
17 changed files
with
596 additions
and
437 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
Oops, something went wrong.