From fe4542279d59bb5a74ac5b4c84e8edf0efb9ef5b Mon Sep 17 00:00:00 2001 From: Sofie Van Landeghem Date: Sat, 20 Sep 2025 18:23:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Install=20pydantic.mypy=20plugin?= =?UTF-8?q?=20(#14081)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/security/api_key.py | 6 +++--- pyproject.toml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fastapi/security/api_key.py b/fastapi/security/api_key.py index 70c2dca8a..6d6dd01d9 100644 --- a/fastapi/security/api_key.py +++ b/fastapi/security/api_key.py @@ -100,7 +100,7 @@ class APIKeyQuery(APIKeyBase): ] = True, ): self.model: APIKey = APIKey( - **{"in": APIKeyIn.query}, # type: ignore[arg-type] + **{"in": APIKeyIn.query}, name=name, description=description, ) @@ -188,7 +188,7 @@ class APIKeyHeader(APIKeyBase): ] = True, ): self.model: APIKey = APIKey( - **{"in": APIKeyIn.header}, # type: ignore[arg-type] + **{"in": APIKeyIn.header}, name=name, description=description, ) @@ -276,7 +276,7 @@ class APIKeyCookie(APIKeyBase): ] = True, ): self.model: APIKey = APIKey( - **{"in": APIKeyIn.cookie}, # type: ignore[arg-type] + **{"in": APIKeyIn.cookie}, name=name, description=description, ) diff --git a/pyproject.toml b/pyproject.toml index 6ec72374c..fbfdea79a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -142,6 +142,7 @@ source-includes = [ name = "fastapi-slim" [tool.mypy] +plugins = ["pydantic.mypy"] strict = true [[tool.mypy.overrides]]