From 09ec28bac8f574e9df9b74230ed914e5f7abcf2f Mon Sep 17 00:00:00 2001 From: svlandeg Date: Wed, 11 Mar 2026 11:55:09 +0100 Subject: [PATCH] several more ignores --- fastapi/applications.py | 2 +- fastapi/dependencies/utils.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fastapi/applications.py b/fastapi/applications.py index 916042cf31..1d25d294bd 100644 --- a/fastapi/applications.py +++ b/fastapi/applications.py @@ -4597,7 +4597,7 @@ class FastAPI(Starlette): Read more about it in the [FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/#alternative-events-deprecated). """ - return self.router.on_event(event_type) + return self.router.on_event(event_type) # ty: ignore[deprecated] def middleware( self, diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index e89017d1c6..edaaee48cb 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -33,7 +33,7 @@ from fastapi._compat import ( Undefined, copy_field_info, create_body_model, - evaluate_forwardref, + evaluate_forwardref, # ty: ignore[deprecated] field_annotation_is_scalar, field_annotation_is_scalar_sequence, field_annotation_is_sequence, @@ -245,7 +245,7 @@ def get_typed_signature(call: Callable[..., Any]) -> inspect.Signature: def get_typed_annotation(annotation: Any, globalns: dict[str, Any]) -> Any: if isinstance(annotation, str): annotation = ForwardRef(annotation) - annotation = evaluate_forwardref(annotation, globalns, globalns) + annotation = evaluate_forwardref(annotation, globalns, globalns) # ty: ignore[deprecated] if annotation is type(None): return None return annotation @@ -323,7 +323,7 @@ def get_dependant( ): assert dependant.call raise DependencyScopeError( - f'The dependency "{dependant.call.__name__}" has a scope of ' + f'The dependency "{dependant.call.__name__}" has a scope of ' # ty: ignore[unresolved-attribute] '"request", it cannot depend on dependencies with scope "function".' ) sub_own_oauth_scopes: list[str] = []