From faaa946902a1f772aaf25c298bd037ceb50005fb Mon Sep 17 00:00:00 2001 From: "ahsan.sheraz" Date: Sat, 14 Mar 2026 16:27:27 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Fix=20duplicated=20words=20in=20?= =?UTF-8?q?docstrings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix "to to" and "that that" word duplications in security module docstrings, and "be be" in test data string. Co-Authored-By: Claude Opus 4.6 --- fastapi/security/http.py | 2 +- fastapi/security/oauth2.py | 4 ++-- fastapi/security/open_id_connect_url.py | 2 +- ...est_pydanticv2_dataclasses_uuid_stringified_annotations.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fastapi/security/http.py b/fastapi/security/http.py index 05299323cb..2765cbc566 100644 --- a/fastapi/security/http.py +++ b/fastapi/security/http.py @@ -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 diff --git a/fastapi/security/oauth2.py b/fastapi/security/oauth2.py index 661043ce7b..42674b476c 100644 --- a/fastapi/security/oauth2.py +++ b/fastapi/security/oauth2.py @@ -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". diff --git a/fastapi/security/open_id_connect_url.py b/fastapi/security/open_id_connect_url.py index 1c6fcc7440..125a819431 100644 --- a/fastapi/security/open_id_connect_url.py +++ b/fastapi/security/open_id_connect_url.py @@ -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. """ diff --git a/tests/test_pydanticv2_dataclasses_uuid_stringified_annotations.py b/tests/test_pydanticv2_dataclasses_uuid_stringified_annotations.py index 4f7b0b2a0a..93d436691a 100644 --- a/tests/test_pydanticv2_dataclasses_uuid_stringified_annotations.py +++ b/tests/test_pydanticv2_dataclasses_uuid_stringified_annotations.py @@ -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, } )