MCPcopy Index your code
hub / github.com/RustPython/RustPython / set_text_content

Function set_text_content

Lib/email/contentmanager.py:185–195  ·  view source on GitHub ↗
(msg, string, subtype="plain", charset='utf-8', cte=None,
                     disposition=None, filename=None, cid=None,
                     params=None, headers=None)

Source from the content-addressed store, hash-verified

183
184
185def set_text_content(msg, string, subtype="plain", charset='utf-8', cte=None,
186 disposition=None, filename=None, cid=None,
187 params=None, headers=None):
188 _prepare_set(msg, 'text', subtype, headers)
189 cte, payload = _encode_text(string, charset, cte, msg.policy)
190 msg.set_payload(payload)
191 msg.set_param('charset',
192 email.charset.ALIASES.get(charset, charset),
193 replace=True)
194 msg['Content-Transfer-Encoding'] = cte
195 _finalize_set(msg, disposition, filename, cid, params)
196raw_data_manager.add_set_handler(str, set_text_content)
197
198

Callers

nothing calls this directly

Calls 6

_prepare_setFunction · 0.85
_encode_textFunction · 0.85
_finalize_setFunction · 0.85
set_payloadMethod · 0.80
set_paramMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected