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

Function from_union

python/copilot/generated/rpc.py:35–41  ·  view source on GitHub ↗
(fs, x)

Source from the content-addressed store, hash-verified

33 return x
34
35def from_union(fs, x):
36 for f in fs:
37 try:
38 return f(x)
39 except Exception:
40 pass
41 assert False
42
43def to_class(c: type[T], x: Any) -> dict:
44 assert isinstance(x, c)

Callers 15

from_dictMethod · 0.70
to_dictMethod · 0.70
from_dictMethod · 0.70
to_dictMethod · 0.70
from_dictMethod · 0.70
to_dictMethod · 0.70
from_dictMethod · 0.70
to_dictMethod · 0.70
from_dictMethod · 0.70
to_dictMethod · 0.70
from_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…