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

Method _check_callback

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

Source from the content-addressed store, hash-verified

839 return handle
840
841 def _check_callback(self, callback, method):
842 if (coroutines.iscoroutine(callback) or
843 coroutines._iscoroutinefunction(callback)):
844 raise TypeError(
845 f"coroutines cannot be used with {method}()")
846 if not callable(callback):
847 raise TypeError(
848 f'a callable object was expected by {method}(), '
849 f'got {callback!r}')
850
851 def _call_soon(self, callback, args, context):
852 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

no outgoing calls

Tested by

no test coverage detected