aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib
diff options
context:
space:
mode:
Diffstat (limited to 'codegen/lib')
-rwxr-xr-xcodegen/lib/code/blocks.py2
-rwxr-xr-xcodegen/lib/code/shapes.py2
-rwxr-xr-xcodegen/lib/code/utils.py13
3 files changed, 0 insertions, 17 deletions
diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py
index 05788731..cda95339 100755
--- a/codegen/lib/code/blocks.py
+++ b/codegen/lib/code/blocks.py
@@ -1,5 +1,4 @@
from lib.utils import get_dir_location, to_camel_case
-from lib.code.utils import clean_property_name
from ..mappings import Mappings
from typing import Optional
import re
@@ -56,7 +55,6 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, pixlyzer_block_dat
block_properties[property_struct_name] = property_variants
- property_name = clean_property_name(property_name)
property_struct_names_to_names[property_struct_name] = property_name
properties.update(block_properties)
diff --git a/codegen/lib/code/shapes.py b/codegen/lib/code/shapes.py
index bedab647..b50cdcf1 100755
--- a/codegen/lib/code/shapes.py
+++ b/codegen/lib/code/shapes.py
@@ -1,6 +1,4 @@
from lib.utils import get_dir_location, to_camel_case
-from lib.code.utils import clean_property_name
-from .blocks import get_property_struct_name
from ..mappings import Mappings
COLLISION_BLOCKS_RS_DIR = get_dir_location(
diff --git a/codegen/lib/code/utils.py b/codegen/lib/code/utils.py
index 71b7d7d8..29adc247 100755
--- a/codegen/lib/code/utils.py
+++ b/codegen/lib/code/utils.py
@@ -173,16 +173,3 @@ def write_packet_file(state, packet_name_snake_case, code):
def fmt():
os.system(f'cd {get_dir_location("..")} && cargo 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)]
-
- # `type` is a reserved keyword, so we use kind instead ¯\_(ツ)_/¯
- # if property_name == 'type':
- # property_name = 'kind'
-
- return property_name