Skip to content

Commit

Permalink
Default to string when we don't understand the format. (#2588)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-edmonds-dd authored Jul 22, 2024
1 parent 79ae956 commit e5355cd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .generator/src/generator/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,9 @@ def simple_type(schema, render_nullable=False, render_new=False):
return {
"date": "time.Time" if not nullable else f"{nullable_prefix}Time",
"date-time": "time.Time" if not nullable else f"{nullable_prefix}Time",
"email": "string" if not nullable else f"{nullable_prefix}String",
"binary": "_io.Reader",
"uuid": "uuid.UUID" if not nullable else f"{nullable_prefix}String",
None: "string" if not nullable else f"{nullable_prefix}String",
}[type_format]
}.get(type_format, "string" if not nullable else f"{nullable_prefix}String")
if type_name == "boolean":
return "bool" if not nullable else f"{nullable_prefix}Bool"

Expand Down

0 comments on commit e5355cd

Please sign in to comment.