MCPcopy Index your code
hub / github.com/slackapi/python-slack-sdk / _files_to_data

Function _files_to_data

slack/web/async_internal_utils.py:142–153  ·  view source on GitHub ↗
(req_args: dict)

Source from the content-addressed store, hash-verified

140
141
142def _files_to_data(req_args: dict) -> List[BinaryIO]:
143 open_files = []
144 files = req_args.pop("files", None)
145 if files is not None:
146 for k, v in files.items():
147 if isinstance(v, str):
148 f = open(v.encode("utf-8", "ignore"), "rb")
149 open_files.append(f)
150 req_args["data"].update({k: f})
151 else:
152 req_args["data"].update({k: v})
153 return open_files
154
155
156async def _request_with_session(

Callers 2

_sendMethod · 0.90
_sendMethod · 0.90

Calls 2

openFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected