From 69ae2641cc86ee60e4d44a199b6cad6da77c164b Mon Sep 17 00:00:00 2001 From: "ahsan.sheraz" Date: Wed, 11 Mar 2026 16:22:28 +0100 Subject: [PATCH] Fix mypy: add type parameters to _LenientDict base class Change `class _LenientDict(dict)` to `class _LenientDict(dict[str, Any])` to satisfy mypy [type-arg] check. Made-with: Cursor --- fastapi/dependencies/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index 1ff4c2483e..667fb4fb64 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -240,7 +240,7 @@ def get_typed_signature(call: Callable[..., Any]) -> inspect.Signature: return typed_signature -class _LenientDict(dict): +class _LenientDict(dict[str, Any]): """Dict subclass where missing keys resolve to Any. Used as an eval namespace so that undefined forward references (e.g. a