Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit is the last in a commit chain adding support for superficially type-checking **typed dictionaries** (i.e., `typing.TypedDict` and `typing_extensions.TypedDict` subclasses), resolving issue #55 kindly submitted by Kyle (@KyleKing), the undisputed King of Parexel AI Labs. Specifically, this commit: * Refines our recently added `beartype._util.hint.pep.proposal.utilpep593.is_hint_pep593()` tester to additionally test for the existence of the `__total__` dunder attribute necessarily added to typed dictionaries. * Improves our private `beartype._util.hint.pep.utilpepget.get_hint_pep_sign_or_none()` getter to uniquely identify typed dictionaries as `HintSignTypedDict`. * Exhaustively tests `@beartype` support for typed dictionaries, including those defined via both: * The official `typing.TypedDict` factory under Python ≥ 3.8. * The third-party `typing_extensions.TypedDict` factory under Python 3.6 and 3.7. (*Unrequited requiem!*)
- Loading branch information
Showing
13 changed files
with
507 additions
and
123 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.