-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
typing(|_extensions).Annotated[object, beartype.vale.Is*, ...]
.
This commit resolves an edge case with respect to beartype validators in which @beartype unconditionally (and thus erroneously) ignored *all* type hints of the form `typing(|_extensions).Annotated[object, beartype.vale.Is*, ...]` (i.e., PEP 593-compliant type hints annotating the otherwise ignorable root `object` superclass by one or more unignorable beartype validators), resolving both issue #290 kindly submitted by Plum maestro @wesselb (Wessel) *and* beartype/plum#120 kindly submitted by professional hodge-podger @hodgespodge. Specifically, this commit: * Improves our private `beartype._util.hint.pep.proposal.utilpep593.is_hint_pep593_ignorable()` tester to avoid ignoring PEP 593-compliant type hints annotated by one or more beartype validators, even if those same hints annotate an ignorable type hint (e.g., the root `object` superclass). * Exhaustively unit tests this edge case. (*Ineluctable defection of delectable perfection!*)
- Loading branch information
Showing
6 changed files
with
161 additions
and
120 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.