Skip to content

Commit

Permalink
Merge pull request #416 from kairu-ms/fix-prop-name-conflict
Browse files Browse the repository at this point in the history
Fix cli generation with build-in keywords
  • Loading branch information
kairu-ms authored Oct 9, 2024
2 parents 5c259ba + cc012f9 commit 66cf323
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aaz_dev/cli/templates/aaz/command/_cmd.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class {{ leaf.cls_name }}(
def {{ arg_cls.builder_name }}(cls, _schema):
if cls.{{ arg_cls.args_schema_name }} is not None:
{%- for prop_name in arg_cls.props %}
_schema.{{ prop_name }} = cls.{{ arg_cls.args_schema_name }}.{{ prop_name }}
_schema.{{ prop_name|avoid_conflict }} = cls.{{ arg_cls.args_schema_name }}.{{ prop_name|avoid_conflict }}
{%- endfor %}
return

Expand Down Expand Up @@ -198,7 +198,7 @@ class {{ leaf.cls_name }}(
{%- endfor %}
{{- "\n" }}
{%- for prop_name in arg_cls.props %}
_schema.{{ prop_name }} = cls.{{ arg_cls.args_schema_name }}.{{ prop_name }}
_schema.{{ prop_name|avoid_conflict }} = cls.{{ arg_cls.args_schema_name }}.{{ prop_name|avoid_conflict }}
{%- endfor %}

{%- endfor %}
Expand Down

0 comments on commit 66cf323

Please sign in to comment.