pydantic-core icon indicating copy to clipboard operation
pydantic-core copied to clipboard

remove remaining `state.allow_partial = false;`

Open samuelcolvin opened this issue 1 year ago • 0 comments

As per #1512, the following validators disable partial support:

  • [ ] DataclassArgsValidator
  • [ ] ModelFieldsValidator
  • [ ] TupleValidator
  • [ ] ArgumentsValidator
  • [ ] GeneratorValidator
  • [ ] DefinitionRefValidator - maybe this is as simple as removing the line, but I don't want to think about it right now

We should remove state.allow_partial = false; and instead set it on all but the last last element/value during validation, as we do for other collections already.

samuelcolvin avatar Nov 03 '24 10:11 samuelcolvin