MCPcopy
hub / github.com/encode/starlette / __init__

Method __init__

starlette/background.py:13–17  ·  view source on GitHub ↗
(self, func: Callable[P, Any], *args: P.args, **kwargs: P.kwargs)

Source from the content-addressed store, hash-verified

11
12class BackgroundTask:
13 def __init__(self, func: Callable[P, Any], *args: P.args, **kwargs: P.kwargs) -> None:
14 self.func = func
15 self.args = args
16 self.kwargs = kwargs
17 self.is_async = is_async_callable(func)
18
19 async def __call__(self) -> None:
20 if self.is_async:

Callers

nothing calls this directly

Calls 1

is_async_callableFunction · 0.90

Tested by

no test coverage detected