-
-
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.
Postponed evaluation of self-referential type hints.
This commit generalizes @beartype's support for forward references from **type forward references** (i.e., references to user-defined *types* that have yet to be defined in the current lexical scope) to **arbitrary forward self-references** (i.e., references to user-defined instances of the currently decorated class – which has yet to be defined in the current lexical scope and thus requires forward references), resolving feature request #217 kindly submitted by Google X JAX "Acronym Maestro" @patrick-kidger (Patrick Kidger). Specifically, this commit unit tests that the prior commit chain resolving feature request #226 "Postponed evaluation of non-referential hints" also perfectly resolved this adjacent feature request as well. Laziness prevails. (*Prevalent multivalence predominates!*)
- Loading branch information
Showing
2 changed files
with
37 additions
and
11 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