MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / single_input_kwargs

Function single_input_kwargs

pywebio/io_ctrl.py:214–226  ·  view source on GitHub ↗
(single_input_return)

Source from the content-addressed store, hash-verified

212
213
214def single_input_kwargs(single_input_return):
215 try:
216 # 协程模式下,单项输入为协程对象,可以通过send(None)来获取传入单项输入的参数字典
217 # In the coroutine mode, the item of `inputs` is coroutine object.
218 # using `send(None)` to get the single input function's parameter dict.
219 single_input_return.send(None)
220 except StopIteration as e: # This is in the coroutine mode
221 input_kwargs = e.args[0]
222 except AttributeError: # This is in the thread mode
223 input_kwargs = single_input_return
224 else:
225 raise RuntimeError("Can't get kwargs from single input")
226 return input_kwargs
227
228
229@chose_impl

Callers 3

input_groupFunction · 0.85
_pin_outputFunction · 0.85
put_actionsFunction · 0.85

Calls 1

sendMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…