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

Function parse_key_to_bytes

packages/node/octobot_node/config.py:45–50  ·  view source on GitHub ↗
(v: str | bytes | None)

Source from the content-addressed store, hash-verified

43
44
45def parse_key_to_bytes(v: str | bytes | None) -> bytes | None:
46 if v is None:
47 return None
48 if isinstance(v, bytes):
49 return v
50 return v.encode('utf-8')
51
52
53class Settings(BaseSettings):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected