]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Fix duplicated words in docstrings (#15116)
authorAhsan Sheraz <ahsansheraz250@gmail.com>
Mon, 16 Mar 2026 10:16:48 +0000 (11:16 +0100)
committerGitHub <noreply@github.com>
Mon, 16 Mar 2026 10:16:48 +0000 (11:16 +0100)
Fix "to to" and "that that" word duplications in security module docstrings,
and "be be" in test data string.

Co-authored-by: ahsan.sheraz <ahsan.sheraz@bonial.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
fastapi/security/http.py
fastapi/security/oauth2.py
fastapi/security/open_id_connect_url.py
tests/test_pydanticv2_dataclasses_uuid_stringified_annotations.py

index 228f2aa8ea5e07eb33854f753ba3d2603ce6f6d6..a32948ef0a0ec61d60d50229038d965ee815d60a 100644 (file)
@@ -321,7 +321,7 @@ class HTTPDigest(HTTPBase):
     HTTP Digest authentication.
 
     **Warning**: this is only a stub to connect the components with OpenAPI in FastAPI,
-    but it doesn't implement the full Digest scheme, you would need to to subclass it
+    but it doesn't implement the full Digest scheme, you would need to subclass it
     and implement it in your code.
 
     Ref: https://datatracker.ietf.org/doc/html/rfc7616
index 661043ce7b885bed3fa72c1b998cdc232266a247..42674b476c143c1a88b6b99a40f7d90a7f986882 100644 (file)
@@ -53,7 +53,7 @@ class OAuth2PasswordRequestForm:
     You could have custom internal logic to separate it by colon characters (`:`) or
     similar, and get the two parts `items` and `read`. Many applications do that to
     group and organize permissions, you could do it as well in your application, just
-    know that that it is application specific, it's not part of the specification.
+    know that it is application specific, it's not part of the specification.
     """
 
     def __init__(
@@ -207,7 +207,7 @@ class OAuth2PasswordRequestFormStrict(OAuth2PasswordRequestForm):
     You could have custom internal logic to separate it by colon characters (`:`) or
     similar, and get the two parts `items` and `read`. Many applications do that to
     group and organize permissions, you could do it as well in your application, just
-    know that that it is application specific, it's not part of the specification.
+    know that it is application specific, it's not part of the specification.
 
 
     grant_type: the OAuth2 spec says it is required and MUST be the fixed string "password".
index 1c6fcc744044a46b5626c197f4ce348583e33e35..125a81943183c818d3831f9bb2555a3881c903a1 100644 (file)
@@ -15,7 +15,7 @@ class OpenIdConnect(SecurityBase):
 
     **Warning**: this is only a stub to connect the components with OpenAPI in FastAPI,
     but it doesn't implement the full OpenIdConnect scheme, for example, it doesn't use
-    the OpenIDConnect URL. You would need to to subclass it and implement it in your
+    the OpenIDConnect URL. You would need to subclass it and implement it in your
     code.
     """
 
index 4f7b0b2a0ac5408f316abcb749db136ec768eb46..93d436691a382e873a23e285a11a484ed17d0649 100644 (file)
@@ -28,7 +28,7 @@ async def read_item():
         "id": uuid.uuid4(),
         "name": "Island In The Moon",
         "price": 12.99,
-        "description": "A place to be be playin' and havin' fun",
+        "description": "A place to be playin' and havin' fun",
         "tags": ["breater"],
     }
 
@@ -45,7 +45,7 @@ def test_annotations():
             "name": "Island In The Moon",
             "price": 12.99,
             "tags": ["breater"],
-            "description": "A place to be be playin' and havin' fun",
+            "description": "A place to be playin' and havin' fun",
             "tax": None,
         }
     )