Skip to content

Commit

Permalink
Change Field() paramater to keyword paramater to support pylance type…
Browse files Browse the repository at this point in the history
  • Loading branch information
crbaker89 committed Feb 17, 2022
1 parent ff39148 commit d01b541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/templates/model.py.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class {{ model.valid_name }}({{model.parents| sort(attribute='depth', reverse=Tr
type_: str = Field("{{ model.name }}", alias='@type')
{% for field in model.fields -%}
{{ field.valid_name }}: {{ field.type }} = Field(
None,
default=None,
{%- if field.valid_name != field.name -%} alias="{{ field.name }}",{% endif %}
description="{{ field.description | replace('\\n','\n') | format_description }}",
)
Expand Down

0 comments on commit d01b541

Please sign in to comment.