We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypedDict
Using postponed evaluation of annotations from PEP-563 breaks TypedDict support introduced in v1.2.0:
v1.2.0
>>> from __future__ import annotations >>> from typing import TypedDict >>> class MyDict(TypedDict): >>> x: int >>> validate({"x": 2}, MyDict) ValueError: Type alias 'int' is not known. Perhaps set it with validation_aliases(int=...)?
The issues is a direct access to t.__annotations__ in _validate_typed_dict, which use get_type_hints(t) instead.
t.__annotations__
_validate_typed_dict
get_type_hints(t)
The text was updated successfully, but these errors were encountered:
c9177be
No branches or pull requests
Using postponed evaluation of annotations from PEP-563 breaks
TypedDict
support introduced inv1.2.0
:The issues is a direct access to
t.__annotations__
in_validate_typed_dict
, which useget_type_hints(t)
instead.The text was updated successfully, but these errors were encountered: