From 87e68689f441a097b071b113982cd6e7a316c31d Mon Sep 17 00:00:00 2001 From: Russell Schmidt Date: Fri, 17 Jan 2025 12:59:16 -0600 Subject: [PATCH] Remove unused sanitize string function --- utilities/utils.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/utilities/utils.py b/utilities/utils.py index 7dfcf00..6b0b48c 100644 --- a/utilities/utils.py +++ b/utilities/utils.py @@ -71,13 +71,3 @@ def get_name_from_number(number, type='long'): name = str(decimal_to_hex(number)) # If long name not found, use the ID as string return name -def sanitize_string(input_str: str) -> str: - """Check if the string starts with a letter (a-z, A-Z) or an underscore (_), and replace all non-alpha/numeric/underscore characters with underscores.""" - - if not re.match(r'^[a-zA-Z_]', input_str): - # If not, add "_" - input_str = '_' + input_str - - # Replace special characters with underscores (for database tables) - sanitized_str: str = re.sub(r'[^a-zA-Z0-9_]', '_', input_str) - return sanitized_str \ No newline at end of file