Skip to content

Commit 9b65021

Browse files
committed
fix: create class name for entities
1 parent fc70cdd commit 9b65021

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

frost_sta_client/odata_codegen/generator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ def snake(name: str) -> str:
685685
arg_parts.append(f"{sn}: {ann} = None")
686686
arg_parts.append("**kwargs")
687687
arg_sig = ",\n\t\t\t\t ".join(arg_parts)
688+
lines.append(f"class {e_name}:")
688689
lines.append(f" def __init__({arg_sig}):")
689690
lines.append(" super().__init__(**kwargs)")
690691
for p in props:
@@ -711,7 +712,7 @@ def snake(name: str) -> str:
711712
lines.append(" return dao")
712713
lines.append(" raise ValueError('No DAO available for this entity')")
713714
lines.append("")
714-
lines.append(f" self.{sn} = {sn}")
715+
lines.append(f" self.{sn} = {sn}")
715716
lines.append("")
716717
# DAO accessor (BaseDao) for backward compatibility with service.create/update/patch/delete
717718
lines.append(" def get_dao(self, service):")

0 commit comments

Comments
 (0)