MCPcopy
hub / github.com/fastapi/fastapi / _build_dependant_with_parameterless_dependencies

Function _build_dependant_with_parameterless_dependencies

fastapi/routing.py:839–853  ·  view source on GitHub ↗
(
    *,
    path: str,
    call: Callable[..., Any],
    dependencies: Sequence[params.Depends],
)

Source from the content-addressed store, hash-verified

837
838
839def _build_dependant_with_parameterless_dependencies(
840 *,
841 path: str,
842 call: Callable[..., Any],
843 dependencies: Sequence[params.Depends],
844) -> tuple[Dependant, Dependant, bool]:
845 dependant = get_dependant(path=path, call=call, scope="function")
846 for depends in dependencies[::-1]:
847 dependant.dependencies.insert(
848 0,
849 get_parameterless_sub_dependant(depends=depends, path=path),
850 )
851 flat_dependant = get_flat_dependant(dependant)
852 embed_body_fields = _should_embed_body_fields(flat_dependant.body_params)
853 return dependant, flat_dependant, embed_body_fields
854
855
856class _RouteWithPath(Protocol):

Callers 4

__init__Method · 0.85
__init__Method · 0.85

Calls 4

get_dependantFunction · 0.90
get_flat_dependantFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…