MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / _safe_module_name

Method _safe_module_name

apps/plugins/loader.py:638–642  ·  view source on GitHub ↗
(self, value: str)

Source from the content-addressed store, hash-verified

636 return re.match(r"^[A-Za-z_][A-Za-z0-9_]*$", name) is not None
637
638 def _safe_module_name(self, value: str) -> str:
639 safe = re.sub(r"[^0-9A-Za-z_]", "_", value)
640 if not safe or safe[0].isdigit():
641 safe = f"p_{safe}"
642 return safe
643
644 def _normalize_fields(self, fields: Any) -> List[Dict[str, Any]]:
645 try:

Callers 1

_resolve_package_nameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected