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
In this example, it requires a list even though I didn't ask for a list.
>>> TypeAdapter(Sequence[int]).validate_python((), strict=True) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/ubuntu/.local/lib/python3.10/site-packages/pydantic/type_adapter.py", line 239, in validate_python return self.validator.validate_python(__object, strict=strict, from_attributes=from_attributes, context=context) pydantic_core._pydantic_core.ValidationError: 1 validation error for json-or-python[json=list[int],python=chain[is-instance[Sequence],function-wrap[sequence_validator()]]] Input should be a valid list [type=list_type, input_value=(), input_type=tuple] For further information visit https://errors.pydantic.dev/2.5/v/list_type
The text was updated successfully, but these errors were encountered:
@Dreamsorcerer,
Thanks for reporting this! This does look like a bug. What version of pydantic are you using?
pydantic
Sorry, something went wrong.
I tested a couple of versions, it's still present on latest version.
Sequence
I've opened a PR with a potential fix, we'll get a fix for this into 2.7!
Merged the PR :) should be fixed on main now.
Successfully merging a pull request may close this issue.
Description
In this example, it requires a list even though I didn't ask for a list.
Example Code
The text was updated successfully, but these errors were encountered: