From 29e6de336f5f778cae78dc2c4bf16ca2a7cbff49 Mon Sep 17 00:00:00 2001 From: water_lift <0xWATERx0@gmail.com> Date: Thu, 26 Nov 2020 16:16:33 +0800 Subject: [PATCH] Remove `# type: ignore` --- fastapi/dependencies/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index 35329a46a5b0c..9ed98c405f35a 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -259,9 +259,7 @@ def get_typed_signature(call: Callable) -> inspect.Signature: def get_typed_annotation(param: inspect.Parameter, globalns: Dict[str, Any]) -> Any: annotation = param.annotation if isinstance(annotation, str): - # Temporary ignore type - # Ref: https://github.com/samuelcolvin/pydantic/issues/1738 - annotation = ForwardRef(annotation) # type: ignore + annotation = ForwardRef(annotation) annotation = evaluate_forwardref(annotation, globalns, globalns) return annotation