Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for iscoroutinefunction (0.08 sec)

  1. fastapi/dependencies/utils.py

    
    def is_coroutine_callable(call: Callable[..., Any]) -> bool:
        if inspect.isroutine(call):
            return inspect.iscoroutinefunction(call)
        if inspect.isclass(call):
            return False
        dunder_call = getattr(call, "__call__", None)  # noqa: B004
        return inspect.iscoroutinefunction(dunder_call)
    
    
    def is_async_gen_callable(call: Callable[..., Any]) -> bool:
        if inspect.isasyncgenfunction(call):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 21:46:26 UTC 2024
    - 34.7K bytes
    - Viewed (0)
  2. fastapi/routing.py

        embed_body_fields: bool = False,
    ) -> Callable[[Request], Coroutine[Any, Any, Response]]:
        assert dependant.call is not None, "dependant.call must be a function"
        is_coroutine = asyncio.iscoroutinefunction(dependant.call)
        is_body_form = body_field and isinstance(body_field.field_info, params.Form)
        if isinstance(response_class, DefaultPlaceholder):
            actual_response_class: Type[Response] = response_class.value
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 12 09:44:57 UTC 2024
    - 172.1K bytes
    - Viewed (0)
Back to top