MCPcopy Create free account
hub / github.com/apple/ml-pointersect / remove_bad_char

Function remove_bad_char

pointersect/meta_script/meta_script_utils.py:31–41  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

29
30
31def remove_bad_char(name: str) -> str:
32 bad_chars = [';', ':', '!', "*", ' ', '+']
33 for c in bad_chars:
34 name = name.replace(c, '_')
35 bad_chars = ['=']
36 for c in bad_chars:
37 name = name.replace(c, '-')
38 bad_chars = [',', '[', ']', '(', ')']
39 for c in bad_chars:
40 name = name.replace(c, '')
41 return name
42
43
44def compile_command(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected