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
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
pydantic version: 1.8.2 pydantic compiled: False install path: /home/msharma216/.local/lib/python3.8/site-packages/pydantic python version: 3.8.0 (default, Feb 25 2021, 22:10:10) [GCC 8.4.0] platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27 optional deps. installed: ['typing-extensions']
When trying to use the validate_arguments decorator, I face the issue of getting validation errors for an extra attribute for a TypedDict as below:
validate_arguments
from typing_extensions import TypedDict from pydantic import validate_arguments, Extra class TypedTest(TypedDict): y: str @validate_arguments(config={'extra': Extra.allow}) def test(other: TypedTest): pass test(other={'y': 'b', 'z': 'a'})
Output:
pydantic.error_wrappers.ValidationError: 1 validation error for Test other -> z extra fields not permitted (type=value_error.extra)
Expected: No errors
Anything I have missed that would let this validation pass for extra attributes in the TypedDict?
Thanks very much!
The text was updated successfully, but these errors were encountered:
extra
Successfully merging a pull request may close this issue.
Checks
Bug
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:When trying to use the
validate_arguments
decorator, I face the issue of getting validation errors for an extra attribute for a TypedDict as below:Output:
Expected: No errors
Anything I have missed that would let this validation pass for extra attributes in the TypedDict?
Thanks very much!
The text was updated successfully, but these errors were encountered: