mirror of https://github.com/tiangolo/fastapi.git
Update fastapi/dependencies/utils.py
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
This commit is contained in:
parent
c3591b32b9
commit
f412d36f62
|
|
@ -245,12 +245,7 @@ def is_scalar_sequence_field(field: ModelField) -> bool:
|
|||
|
||||
def get_typed_signature(call: Callable[..., Any]) -> inspect.Signature:
|
||||
signature = inspect.signature(call)
|
||||
nsobj = call
|
||||
while hasattr(nsobj, "__wrapped__"):
|
||||
# The __wrapped__ attribute is set by decorators, e.g. functools.wraps.
|
||||
# This while loop allows rereferencing forward references on decorated
|
||||
# methods.
|
||||
nsobj = nsobj.__wrapped__ # type: ignore
|
||||
nsobj = inspect.unwrap(call)
|
||||
globalns = getattr(nsobj, "__globals__", {})
|
||||
typed_params = [
|
||||
inspect.Parameter(
|
||||
|
|
|
|||
Loading…
Reference in New Issue