From 8050a0ce760cef6c991793efe4394f5b6a974874 Mon Sep 17 00:00:00 2001 From: Vansh Date: Sat, 24 Jan 2026 17:03:24 +0530 Subject: [PATCH] Fixed typos in documentation --- docs/en/docs/tutorial/bigger-applications.md | 2 +- .../docs/tutorial/dependencies/classes-as-dependencies.md | 2 +- docs/en/docs/tutorial/sql-databases.md | 2 +- docs_src/python_types/tutorial011_py39.py | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/en/docs/tutorial/bigger-applications.md b/docs/en/docs/tutorial/bigger-applications.md index f6cee8036..e1e55d587 100644 --- a/docs/en/docs/tutorial/bigger-applications.md +++ b/docs/en/docs/tutorial/bigger-applications.md @@ -309,7 +309,7 @@ And we can even declare [global dependencies](dependencies/global-dependencies.m ### Import the `APIRouter` { #import-the-apirouter } -Now we import the other submodules that have `APIRouter`s: +Now we import the other submodules that have `APIRouter`'s: {* ../../docs_src/bigger_applications/app_an_py39/main.py hl[4:5] title["app/main.py"] *} diff --git a/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md b/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md index 0a6a786b5..22ac27265 100644 --- a/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md +++ b/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md @@ -10,7 +10,7 @@ In the previous example, we were returning a `dict` from our dependency ("depend But then we get a `dict` in the parameter `commons` of the *path operation function*. -And we know that editors can't provide a lot of support (like completion) for `dict`s, because they can't know their keys and value types. +And we know that editors can't provide a lot of support (like completion) for `dict`'s, because they can't know their keys and value types. We can do better... diff --git a/docs/en/docs/tutorial/sql-databases.md b/docs/en/docs/tutorial/sql-databases.md index b42e9ba2f..37ce85cf7 100644 --- a/docs/en/docs/tutorial/sql-databases.md +++ b/docs/en/docs/tutorial/sql-databases.md @@ -129,7 +129,7 @@ Here we use the `SessionDep` dependency (a `Session`) to add the new `Hero` to t ### Read Heroes { #read-heroes } -We can **read** `Hero`s from the database using a `select()`. We can include a `limit` and `offset` to paginate the results. +We can **read** `Hero`'s from the database using a `select()`. We can include a `limit` and `offset` to paginate the results. {* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[48:55] hl[51:52,54] *} diff --git a/docs_src/python_types/tutorial011_py39.py b/docs_src/python_types/tutorial011_py39.py index 4eb40b405..f3d15e403 100644 --- a/docs_src/python_types/tutorial011_py39.py +++ b/docs_src/python_types/tutorial011_py39.py @@ -8,16 +8,16 @@ class User(BaseModel): id: int name: str = "John Doe" signup_ts: Union[datetime, None] = None - friends: list[int] = [] + friends: list[int] = [] # List of Integer external_data = { "id": "123", - "signup_ts": "2017-06-01 12:22", - "friends": [1, "2", b"3"], + "signup_ts": "2026-01-01 22:22", + "friends": [1, 2, 3], } user = User(**external_data) print(user) -# > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3] +# > User id=123 name='John Doe' signup_ts=datetime.datetime(2026, 1, 1, 22, 22) friends=[1, 2, 3] print(user.id) # > 123