79495802

Date: 2025-03-09 11:04:38
Score: 0.5
Natty:
Report link
OptionalClientModel = create_model(
    "OptionalClientModel",
    **{k: (v.annotation | None, v) for k, v in ClientModel.model_fields.items()})

This should suit your needs. No need to iterate over the annotations yourself.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: lord_haffi