From 8f4ae5f482769908b89caf09c23f6515e3895793 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Thu, 21 Mar 2024 14:24:57 +0100 Subject: [PATCH] add `**kwargs` to add method template --- sdRDM/generator/templates/add_method_template.jinja2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdRDM/generator/templates/add_method_template.jinja2 b/sdRDM/generator/templates/add_method_template.jinja2 index 440f58c..32b4176 100644 --- a/sdRDM/generator/templates/add_method_template.jinja2 +++ b/sdRDM/generator/templates/add_method_template.jinja2 @@ -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}} @@ -26,4 +27,4 @@ self.{{attribute}}.append({{cls}}(**params)) - return self.{{attribute}}[-1] \ No newline at end of file + return self.{{attribute}}[-1]