MCPcopy Index your code
hub / github.com/github/copilot-sdk / to_enum

Function to_enum

python/copilot/generated/rpc.py:67–69  ·  view source on GitHub ↗
(c: type[EnumT], x: Any)

Source from the content-addressed store, hash-verified

65 return [f(y) for y in x]
66
67def to_enum(c: type[EnumT], x: Any) -> EnumT:
68 assert isinstance(x, c)
69 return x.value
70
71def from_int(x: Any) -> int:
72 assert isinstance(x, int) and not isinstance(x, bool)

Callers 15

to_dictMethod · 0.70
to_dictMethod · 0.70
to_dictMethod · 0.70
to_dictMethod · 0.70
to_dictMethod · 0.70
to_dictMethod · 0.70
to_dictMethod · 0.70
to_dictMethod · 0.70
to_dictMethod · 0.70
to_dictMethod · 0.70
to_dictMethod · 0.70
to_dictMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…