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

Method from_dict

python/copilot/generated/rpc.py:10964–10976  ·  view source on GitHub ↗
(obj: Any)

Source from the content-addressed store, hash-verified

10962
10963 @staticmethod
10964 def from_dict(obj: Any) -> 'InstructionSource':
10965 assert isinstance(obj, dict)
10966 content = from_str(obj.get("content"))
10967 id = from_str(obj.get("id"))
10968 label = from_str(obj.get("label"))
10969 location = InstructionLocation(obj.get("location"))
10970 source_path = from_str(obj.get("sourcePath"))
10971 type = InstructionSourceType(obj.get("type"))
10972 apply_to = from_union([lambda x: from_list(from_str, x), from_none], obj.get("applyTo"))
10973 default_disabled = from_union([from_bool, from_none], obj.get("defaultDisabled"))
10974 description = from_union([from_str, from_none], obj.get("description"))
10975 project_path = from_union([from_str, from_none], obj.get("projectPath"))
10976 return InstructionSource(content, id, label, location, source_path, type, apply_to, default_disabled, description, project_path)
10977
10978 def to_dict(self) -> dict:
10979 result: dict = {}

Callers

nothing calls this directly

Calls 7

InstructionLocationClass · 0.85
from_strFunction · 0.70
from_unionFunction · 0.70
from_listFunction · 0.70
InstructionSourceClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected