MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / accept_json_message

Method accept_json_message

tests_python/test_debugger_json.py:104–113  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

102 def wait_for_json_message(self, expected_class, accept_message=lambda obj: True):
103
104 def accept_json_message(msg):
105 if msg.startswith("{"):
106 decoded_msg = from_json(msg)
107
108 self._all_json_messages_found.append(_MessageWithMark(decoded_msg))
109
110 if isinstance(decoded_msg, expected_class):
111 if accept_message(decoded_msg):
112 return True
113 return False
114
115 msg = self.writer.wait_for_message(accept_json_message, unquote_msg=False, expect_xml=False)
116 return from_json(msg)

Callers

nothing calls this directly

Calls 4

from_jsonFunction · 0.90
_MessageWithMarkClass · 0.85
accept_messageFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected