MCPcopy Create free account
hub / github.com/doraemonext/wechat-python-sdk / __init__

Method __init__

wechat_sdk/messages.py:67–76  ·  view source on GitHub ↗
(self, message)

Source from the content-addressed store, hash-verified

65@handle_for_type('location')
66class LocationMessage(WechatMessage):
67 def __init__(self, message):
68 try:
69 location_x = message.pop('Location_X')
70 location_y = message.pop('Location_Y')
71 self.location = (float(location_x), float(location_y))
72 self.scale = int(message.pop('Scale'))
73 self.label = message.pop('Label')
74 except KeyError:
75 raise ParseError()
76 super(LocationMessage, self).__init__(message)
77
78
79@handle_for_type('link')

Callers

nothing calls this directly

Calls 3

ParseErrorClass · 0.85
popMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected