Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #62 from JR-1991/60-add-kwargs-to-add-methods
Browse files Browse the repository at this point in the history
Add `**kwargs` to add method template
  • Loading branch information
JR-1991 authored Mar 21, 2024
2 parents a50a66c + 8f4ae5f commit ab22108
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdRDM/generator/templates/add_method_template.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{attr.name}}: {{attr.type}} {% if 'default' in attr%}= {{attr.default}} {% elif attr.multiple is true %}= ListPlus(){% endif %},
{%- endfor %}
id: Optional[str] = None,
**kwargs,
) -> {{ cls }}:
"""
{{summary}}
Expand All @@ -26,4 +27,4 @@

self.{{attribute}}.append({{cls}}(**params))

return self.{{attribute}}[-1]
return self.{{attribute}}[-1]

0 comments on commit ab22108

Please sign in to comment.