Skip to content

Commit

Permalink
fix xnuinside#65 booleans are not capitalized
Browse files Browse the repository at this point in the history
  • Loading branch information
Dracax committed Jan 17, 2025
1 parent 3f7b067 commit fcac01d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions omymodels/from_ddl.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,17 @@ def prepare_data(item: Dict) -> Dict:
item[key] = clean_value(value)
elif isinstance(value, dict):
value = prepare_data(value)
else:
item[key] = format_to_py_var(value)
return item


def format_to_py_var(value: str) -> str:
if value in ["false", "true"]:
return value.capitalize()
return value


def clean_value(string: str) -> str:
string = string.replace('"', "")
if string.startswith("[") and string.endswith("]"):
Expand Down

0 comments on commit fcac01d

Please sign in to comment.