Home / Function/ get_typed_return_annotation() — fastapi Function Reference

get_typed_return_annotation() — fastapi Function Reference

Architecture documentation for the get_typed_return_annotation() function in utils.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  7ee6f7cb_c895_d136_b942_3a323fcab521["get_typed_return_annotation()"]
  9e602cbf_3139_86ae_5666_97b8806942de["utils.py"]
  7ee6f7cb_c895_d136_b942_3a323fcab521 -->|defined in| 9e602cbf_3139_86ae_5666_97b8806942de
  d8b4fb83_3521_0b7e_fcfa_0c7f161ca116["__init__()"]
  d8b4fb83_3521_0b7e_fcfa_0c7f161ca116 -->|calls| 7ee6f7cb_c895_d136_b942_3a323fcab521
  fbcdf484_be03_f18c_5e32_2ef21742686c["_get_signature()"]
  7ee6f7cb_c895_d136_b942_3a323fcab521 -->|calls| fbcdf484_be03_f18c_5e32_2ef21742686c
  e8e5e486_6061_0953_033a_81c4f70588c1["get_typed_annotation()"]
  7ee6f7cb_c895_d136_b942_3a323fcab521 -->|calls| e8e5e486_6061_0953_033a_81c4f70588c1
  style 7ee6f7cb_c895_d136_b942_3a323fcab521 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fastapi/dependencies/utils.py lines 245–254

def get_typed_return_annotation(call: Callable[..., Any]) -> Any:
    signature = _get_signature(call)
    unwrapped = inspect.unwrap(call)
    annotation = signature.return_annotation

    if annotation is inspect.Signature.empty:
        return None

    globalns = getattr(unwrapped, "__globals__", {})
    return get_typed_annotation(annotation, globalns)

Subdomains

Called By

Frequently Asked Questions

What does get_typed_return_annotation() do?
get_typed_return_annotation() is a function in the fastapi codebase, defined in fastapi/dependencies/utils.py.
Where is get_typed_return_annotation() defined?
get_typed_return_annotation() is defined in fastapi/dependencies/utils.py at line 245.
What does get_typed_return_annotation() call?
get_typed_return_annotation() calls 2 function(s): _get_signature, get_typed_annotation.
What calls get_typed_return_annotation()?
get_typed_return_annotation() is called by 1 function(s): __init__.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free