MCPcopy Create free account
hub / github.com/Drakkar-Software/OctoBot / parse_cors

Function parse_cors

packages/node/octobot_node/config.py:37–42  ·  view source on GitHub ↗
(v: Any)

Source from the content-addressed store, hash-verified

35
36
37def parse_cors(v: Any) -> list[str] | str:
38 if isinstance(v, str) and not v.startswith("["):
39 return [i.strip() for i in v.split(",") if i.strip()]
40 elif isinstance(v, list | str):
41 return v
42 raise ValueError(v)
43
44
45def parse_key_to_bytes(v: str | bytes | None) -> bytes | None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected