Check if the field is required (i.e., does not have a default value or factory). Returns: `True` if the field is required, `False` otherwise.
(self)
| 744 | ) |
| 745 | |
| 746 | def is_required(self) -> bool: |
| 747 | """Check if the field is required (i.e., does not have a default value or factory). |
| 748 | |
| 749 | Returns: |
| 750 | `True` if the field is required, `False` otherwise. |
| 751 | """ |
| 752 | return self.default is PydanticUndefined and self.default_factory is None |
| 753 | |
| 754 | def rebuild_annotation(self) -> Any: |
| 755 | """Attempts to rebuild the original annotation for use in function signatures. |
no outgoing calls