mirror of https://github.com/tiangolo/fastapi.git
mypy complains about this code since Callable does not have a .__wrapped__ attribute.
It is guarded by a hasattr check, so it is safe to ignore this error.
This commit is contained in:
parent
cd17a8ceaf
commit
c1691f5d94
|
|
@ -250,7 +250,7 @@ def get_typed_signature(call: Callable[..., Any]) -> inspect.Signature:
|
|||
# The __wrapped__ attribute is set by decorators, e.g. functools.wraps.
|
||||
# This while loop allows rereferencing forward references on decorated
|
||||
# methods.
|
||||
nsobj = nsobj.__wrapped__
|
||||
nsobj = nsobj.__wrapped__ # type: ignore
|
||||
globalns = getattr(nsobj, "__globals__", {})
|
||||
typed_params = [
|
||||
inspect.Parameter(
|
||||
|
|
|
|||
Loading…
Reference in New Issue