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

Method _check_callback

Lib/asyncio/base_events.py:836–844  ·  view source on GitHub ↗
(self, callback, method)

Source from the content-addressed store, hash-verified

834 return handle
835
836 def _check_callback(self, callback, method):
837 if (coroutines.iscoroutine(callback) or
838 coroutines._iscoroutinefunction(callback)):
839 raise TypeError(
840 f"coroutines cannot be used with {method}()")
841 if not callable(callback):
842 raise TypeError(
843 f'a callable object was expected by {method}(), '
844 f'got {callback!r}')
845
846 def _call_soon(self, callback, args, context):
847 handle = events.Handle(callback, args, self, context)

Callers 4

call_atMethod · 0.95
call_soonMethod · 0.95
call_soon_threadsafeMethod · 0.95
run_in_executorMethod · 0.95

Calls 1

callableFunction · 0.85

Tested by

no test coverage detected