feat(exporter): handle docfield being non-nullable

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2023-10-31 16:17:41 +05:30
parent 8d540963c8
commit 8d91e4524f
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -162,6 +162,9 @@ class TypeExporter:
if field.fieldtype in non_nullable_types:
return False
if field.not_nullable:
return False
return not bool(field.reqd)
def _generic_parameters(self, field) -> str | None: