MCPcopy Index your code
hub / github.com/miguelgrinberg/python-socketio / _deconstruct_binary_internal

Method _deconstruct_binary_internal

src/socketio/packet.py:156–167  ·  view source on GitHub ↗
(cls, data, attachments)

Source from the content-addressed store, hash-verified

154
155 @classmethod
156 def _deconstruct_binary_internal(cls, data, attachments):
157 if isinstance(data, (bytes, bytearray)):
158 attachments.append(data)
159 return {'_placeholder': True, 'num': len(attachments) - 1}
160 elif isinstance(data, list):
161 return [cls._deconstruct_binary_internal(item, attachments)
162 for item in data]
163 elif isinstance(data, dict):
164 return {key: cls._deconstruct_binary_internal(value, attachments)
165 for key, value in data.items()}
166 else:
167 return data
168
169 @classmethod
170 def data_is_binary(cls, data):

Callers 1

deconstruct_binaryMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected