Skip to content

Commit 5f635b6

Browse files
fix: update print statements and dictionary processing
Co-Authored-By: vshenoy@codegen.com <vshenoy@codegen.com>
1 parent b169643 commit 5f635b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.codegen/codemods/dict_to_schema/dict_to_schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ def infer_type_from_value(value: str) -> str:
120120
print(f"\033[1;32m🔄 Converting global variable '{global_var.name}' to schema\033[0m")
121121
print("─" * 60)
122122
print("\033[1;34m📝 Original code:\033[0m")
123-
print(f" {global_var.name} = {global_var.value.source}")
123+
print(f" {global_var.source}")
124124
print("\n\033[1;35m✨ Generated schema:\033[0m")
125125
print(" " + model_def.replace("\n", "\n "))
126126
print("\n\033[1;32m✅ Updated code:\033[0m")
127-
print(f" {global_var.name} = {class_name}(**{global_var.value.source})")
127+
print(f" {init_code}")
128128
print("═" * 60)
129129

130130
global_var.file.add_symbol_from_source(model_def + "\n")
@@ -153,7 +153,7 @@ def infer_type_from_value(value: str) -> str:
153153
print(f"\033[1;32m🔄 Converting list items in '{global_var.name}' to schema\033[0m")
154154
print("─" * 60)
155155
print("\033[1;34m📝 Original code:\033[0m")
156-
print(f" {global_var.name} = {global_var.value.source}")
156+
print(f" {global_var.source}")
157157
print("\n\033[1;35m✨ Generated schema:\033[0m")
158158
print(" " + model_def.replace("\n", "\n "))
159159
print("\n\033[1;32m✅ Updated code:\033[0m")

0 commit comments

Comments
 (0)