1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 04:21:17 +00:00

utils/misc: remove unused to_identifier

This has been moved to devlib, but, it appears, never removed from WA.
This commit is contained in:
Sergei Trofimov 2018-02-15 13:51:35 +00:00 committed by Marc Bonnici
parent 8466b77d5b
commit e3b3799737

View File

@ -290,14 +290,6 @@ class LoadSyntaxError(Exception):
RAND_MOD_NAME_LEN = 30
BAD_CHARS = string.punctuation + string.whitespace
TRANS_TABLE = string.maketrans(BAD_CHARS, '_' * len(BAD_CHARS))
def to_identifier(text):
"""Converts text to a valid Python identifier by replacing all
whitespace and punctuation."""
return re.sub('_+', '_', text.translate(TRANS_TABLE))
def load_struct_from_python(filepath=None, text=None):