]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🚨 Install pydantic.mypy plugin (#14081)
authorSofie Van Landeghem <svlandeg@users.noreply.github.com>
Sat, 20 Sep 2025 16:23:06 +0000 (18:23 +0200)
committerGitHub <noreply@github.com>
Sat, 20 Sep 2025 16:23:06 +0000 (18:23 +0200)
fastapi/security/api_key.py
pyproject.toml

index 70c2dca8a81fea5620185374ce22ba77c356027f..6d6dd01d91ff854fe8cb0e5bbe2e6c050e41141d 100644 (file)
@@ -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,
         )
index 6ec72374c8760cec284e15461462559967756792..fbfdea79a45045d9d12eb012eadcdd43567197d3 100644 (file)
@@ -142,6 +142,7 @@ source-includes = [
 name = "fastapi-slim"
 
 [tool.mypy]
+plugins = ["pydantic.mypy"]
 strict = true
 
 [[tool.mypy.overrides]]