Remove characters that might be present in OPC UA structures but cannot be part of of Python class names
(name)
| 293 | |
| 294 | |
| 295 | def _clean_name(name): |
| 296 | """ |
| 297 | Remove characters that might be present in OPC UA structures |
| 298 | but cannot be part of of Python class names |
| 299 | """ |
| 300 | name = re.sub(r'\W+', '_', name) |
| 301 | name = re.sub(r'\.', '_', name) |
| 302 | name = re.sub(r'"', '_', name) |
| 303 | name = re.sub(r'^[0-9]+', r'_\g<0>', name) |
| 304 | |
| 305 | return name |
| 306 | |
| 307 | |
| 308 | def _generate_python_class(model, env=None): |
no outgoing calls
no test coverage detected