MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / safe_module_name

Function safe_module_name

codeclash/arenas/cyborg/runtime/run_cyborg.py:20–24  ·  view source on GitHub ↗
(player_name: str)

Source from the content-addressed store, hash-verified

18
19
20def safe_module_name(player_name: str) -> str:
21 safe = re.sub(r"\W+", "_", player_name)
22 if not safe or safe[0].isdigit():
23 safe = f"player_{safe}"
24 return f"codeclash_cyborg_{safe.lower()}"
25
26
27def load_policy_module(player_name: str, path: str):

Callers 1

load_policy_moduleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected