aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib/code
diff options
context:
space:
mode:
Diffstat (limited to 'codegen/lib/code')
-rwxr-xr-xcodegen/lib/code/blocks.py3
-rwxr-xr-xcodegen/lib/code/utils.py10
2 files changed, 6 insertions, 7 deletions
diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py
index 64347849..05788731 100755
--- a/codegen/lib/code/blocks.py
+++ b/codegen/lib/code/blocks.py
@@ -125,8 +125,7 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, pixlyzer_block_dat
assert property_default is not None
- property_name = clean_property_name(property_name)
- this_property_code = f'{property_name}: {property_default_type}'
+ this_property_code = f'"{property_name}": {property_default_type}'
properties_code += f'\n {this_property_code},'
# if there's nothing inside the properties, keep it in one line
diff --git a/codegen/lib/code/utils.py b/codegen/lib/code/utils.py
index f4f9ca82..71b7d7d8 100755
--- a/codegen/lib/code/utils.py
+++ b/codegen/lib/code/utils.py
@@ -177,12 +177,12 @@ def fmt():
def clean_property_name(property_name):
# if the name ends with _<number>, remove that part
- ending = property_name.split('_')[-1]
- if ending.isdigit():
- property_name = property_name[:-(len(ending) + 1)]
+ # ending = property_name.split('_')[-1]
+ # if ending.isdigit():
+ # property_name = property_name[:-(len(ending) + 1)]
# `type` is a reserved keyword, so we use kind instead ¯\_(ツ)_/¯
- if property_name == 'type':
- property_name = 'kind'
+ # if property_name == 'type':
+ # property_name = 'kind'
return property_name