MCPcopy
hub / github.com/MAA1999/M9A / from_dict

Method from_dict

agent/utils/pienv.py:60–69  ·  view source on GitHub ↗
(cls, data: Any)

Source from the content-addressed store, hash-verified

58
59 @classmethod
60 def from_dict(cls, data: Any) -> "Win32Config | None":
61 if not isinstance(data, dict):
62 return None
63 return cls(
64 class_regex=_as_string(data.get("class_regex")),
65 window_regex=_as_string(data.get("window_regex")),
66 screencap=_as_string(data.get("screencap")),
67 mouse=_as_string(data.get("mouse")),
68 keyboard=_as_string(data.get("keyboard")),
69 )
70
71
72@dataclass(frozen=True)

Callers

nothing calls this directly

Calls 1

_as_stringFunction · 0.85

Tested by

no test coverage detected