MCPcopy Index your code
hub / github.com/python/cpython / _finalize_set

Function _finalize_set

Lib/email/contentmanager.py:115–129  ·  view source on GitHub ↗
(msg, disposition, filename, cid, params)

Source from the content-addressed store, hash-verified

113
114
115def _finalize_set(msg, disposition, filename, cid, params):
116 if disposition is None and filename is not None:
117 disposition = 'attachment'
118 if disposition is not None:
119 msg['Content-Disposition'] = disposition
120 if filename is not None:
121 msg.set_param('filename',
122 filename,
123 header='Content-Disposition',
124 replace=True)
125 if cid is not None:
126 msg['Content-ID'] = cid
127 if params is not None:
128 for key, value in params.items():
129 msg.set_param(key, value)
130
131
132def _encode_text(string, charset, cte, policy):

Callers 3

set_text_contentFunction · 0.85
set_message_contentFunction · 0.85
set_bytes_contentFunction · 0.85

Calls 2

set_paramMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…