remove all references to clean_property_name

This commit is contained in:
mat 2024-05-23 03:29:37 +00:00
parent 22baedb24b
commit c7f9dc4b3d
3 changed files with 0 additions and 17 deletions

View file

@ -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)

View file

@ -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(

View file

@ -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