]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
✏️ Fix typo: convert every 're-use' to 'reuse'. (#11598)
authorHasan Sezer Taşan <13135006+hasansezertasan@users.noreply.github.com>
Sat, 18 May 2024 23:43:13 +0000 (02:43 +0300)
committerGitHub <noreply@github.com>
Sat, 18 May 2024 23:43:13 +0000 (18:43 -0500)
13 files changed:
docs/en/docs/advanced/additional-responses.md
docs/en/docs/advanced/path-operation-advanced-configuration.md
docs/en/docs/advanced/security/oauth2-scopes.md
docs/en/docs/advanced/settings.md
docs/en/docs/advanced/templates.md
docs/en/docs/deployment/docker.md
docs/en/docs/how-to/custom-docs-ui-assets.md
docs/en/docs/how-to/nosql-databases-couchbase.md
docs/en/docs/release-notes.md
docs/en/docs/tutorial/background-tasks.md
docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
docs/en/docs/tutorial/dependencies/sub-dependencies.md
docs/en/docs/tutorial/handling-errors.md

index 41b39c18e6bc1059b065cdd75bd40cdd793dc6dd..88d27018c464ae242407cbcf158c5433f7633957 100644 (file)
@@ -224,7 +224,7 @@ Here, `new_dict` will contain all the key-value pairs from `old_dict` plus the n
 }
 ```
 
-You can use that technique to re-use some predefined responses in your *path operations* and combine them with additional custom ones.
+You can use that technique to reuse some predefined responses in your *path operations* and combine them with additional custom ones.
 
 For example:
 
index c5544a78bc71ed65a2213da3d7ce36ef7b7e8a59..35f7d1b8d9aaa8783c2570bdd1da1f988392dcab 100644 (file)
@@ -187,6 +187,6 @@ And then in our code, we parse that YAML content directly, and then we are again
     In Pydantic version 1 the method to parse and validate an object was `Item.parse_obj()`, in Pydantic version 2, the method is called `Item.model_validate()`.
 
 !!! tip
-    Here we re-use the same Pydantic model.
+    Here we reuse the same Pydantic model.
 
     But the same way, we could have validated it in some other way.
index b93d2991c4dcb88d8636ad613961d886a424be66..728104865296cdcf4a07f7272a6f961790abcfb5 100644 (file)
@@ -361,7 +361,7 @@ It will have a property `scopes` with a list containing all the scopes required
 
 The `security_scopes` object (of class `SecurityScopes`) also provides a `scope_str` attribute with a single string, containing those scopes separated by spaces (we are going to use it).
 
-We create an `HTTPException` that we can re-use (`raise`) later at several points.
+We create an `HTTPException` that we can reuse (`raise`) later at several points.
 
 In this exception, we include the scopes required (if any) as a string separated by spaces (using `scope_str`). We put that string containing the scopes in the `WWW-Authenticate` header (this is part of the spec).
 
index f9b525a5884f556783e958e5b45a42ae52b7780e..56af4f441aa0b4d09933d76297279a3ab9fe667d 100644 (file)
@@ -369,7 +369,7 @@ Here we define the config `env_file` inside of your Pydantic `Settings` class, a
 
 ### Creating the `Settings` only once with `lru_cache`
 
-Reading a file from disk is normally a costly (slow) operation, so you probably want to do it only once and then re-use the same settings object, instead of reading it for each request.
+Reading a file from disk is normally a costly (slow) operation, so you probably want to do it only once and then reuse the same settings object, instead of reading it for each request.
 
 But every time we do:
 
index 6055b30170db67f5189b6d570aa0a6481bb09e95..4a577215a9c2b62b70e89000ece855ba9f4663cb 100644 (file)
@@ -23,7 +23,7 @@ $ pip install jinja2
 ## Using `Jinja2Templates`
 
 * Import `Jinja2Templates`.
-* Create a `templates` object that you can re-use later.
+* Create a `templates` object that you can reuse later.
 * Declare a `Request` parameter in the *path operation* that will return a template.
 * Use the `templates` you created to render and return a `TemplateResponse`, pass the name of the template, the request object, and a "context" dictionary with key-value pairs to be used inside of the Jinja2 template.
 
index 5181f77e0d7e8e76071c5a527bcdb23ad3fed430..5cd24eb46293d980dc231a2f1e5a52e018f810c0 100644 (file)
@@ -70,7 +70,7 @@ And there are many other images for different things like databases, for example
 
 By using a pre-made container image it's very easy to **combine** and use different tools. For example, to try out a new database. In most cases, you can use the **official images**, and just configure them with environment variables.
 
-That way, in many cases you can learn about containers and Docker and re-use that knowledge with many different tools and components.
+That way, in many cases you can learn about containers and Docker and reuse that knowledge with many different tools and components.
 
 So, you would run **multiple containers** with different things, like a database, a Python application, a web server with a React frontend application, and connect them together via their internal network.
 
@@ -249,7 +249,7 @@ COPY ./requirements.txt /code/requirements.txt
 
 Docker and other tools **build** these container images **incrementally**, adding **one layer on top of the other**, starting from the top of the `Dockerfile` and adding any files created by each of the instructions of the `Dockerfile`.
 
-Docker and similar tools also use an **internal cache** when building the image, if a file hasn't changed since the last time building the container image, then it will **re-use the same layer** created the last time, instead of copying the file again and creating a new layer from scratch.
+Docker and similar tools also use an **internal cache** when building the image, if a file hasn't changed since the last time building the container image, then it will **reuse the same layer** created the last time, instead of copying the file again and creating a new layer from scratch.
 
 Just avoiding the copy of files doesn't necessarily improve things too much, but because it used the cache for that step, it can **use the cache for the next step**. For example, it could use the cache for the instruction that installs dependencies with:
 
index 9726be2c710e2556968cef65cbb0b03ca43ac855..adc1c1ef45160c119786ae62c5b9b5801bb9d5a1 100644 (file)
@@ -26,7 +26,7 @@ To disable them, set their URLs to `None` when creating your `FastAPI` app:
 
 Now you can create the *path operations* for the custom docs.
 
-You can re-use FastAPI's internal functions to create the HTML pages for the docs, and pass them the needed arguments:
+You can reuse FastAPI's internal functions to create the HTML pages for the docs, and pass them the needed arguments:
 
 * `openapi_url`: the URL where the HTML page for the docs can get the OpenAPI schema for your API. You can use here the attribute `app.openapi_url`.
 * `title`: the title of your API.
@@ -163,7 +163,7 @@ To disable them, set their URLs to `None` when creating your `FastAPI` app:
 
 And the same way as with a custom CDN, now you can create the *path operations* for the custom docs.
 
-Again, you can re-use FastAPI's internal functions to create the HTML pages for the docs, and pass them the needed arguments:
+Again, you can reuse FastAPI's internal functions to create the HTML pages for the docs, and pass them the needed arguments:
 
 * `openapi_url`: the URL where the HTML page for the docs can get the OpenAPI schema for your API. You can use here the attribute `app.openapi_url`.
 * `title`: the title of your API.
index 563318984378d7bb18f5b0ad5fd2b123166b39a1..18e3f4b7e1f52ef2cc71d927b7048f3153c65ba7 100644 (file)
@@ -108,7 +108,7 @@ Now create a function that will:
 * Get the document with that ID.
 * Put the contents of the document in a `UserInDB` model.
 
-By creating a function that is only dedicated to getting your user from a `username` (or any other parameter) independent of your *path operation function*, you can more easily re-use it in multiple parts and also add <abbr title="Automated test, written in code, that checks if another piece of code is working correctly.">unit tests</abbr> for it:
+By creating a function that is only dedicated to getting your user from a `username` (or any other parameter) independent of your *path operation function*, you can more easily reuse it in multiple parts and also add <abbr title="Automated test, written in code, that checks if another piece of code is working correctly.">unit tests</abbr> for it:
 
 ```Python hl_lines="36-42"
 {!../../../docs_src/nosql_databases/tutorial001.py!}
index 58d15c4940d726b614d3be759d34ceeaef8266f7..b8201e9f8df05f85e15d6a0556efd44a0c90b37b 100644 (file)
@@ -3872,7 +3872,7 @@ Note: all the previous parameters are still there, so it's still possible to dec
     * New documentation about exceptions handlers:
         * [Install custom exception handlers](https://fastapi.tiangolo.com/tutorial/handling-errors/#install-custom-exception-handlers).
         * [Override the default exception handlers](https://fastapi.tiangolo.com/tutorial/handling-errors/#override-the-default-exception-handlers).
-        * [Re-use **FastAPI's** exception handlers](https://fastapi.tiangolo.com/tutorial/handling-errors/#re-use-fastapis-exception-handlers).
+        * [Reuse **FastAPI's** exception handlers](https://fastapi.tiangolo.com/tutorial/handling-errors/#reuse-fastapis-exception-handlers).
     * PR [#273](https://github.com/tiangolo/fastapi/pull/273).
 
 * Fix support for *paths* in *path parameters* without needing explicit `Path(...)`.
index bc8e2af6a08d9da3614c7ce3d2328d1706dcb3c4..bcfadc8b861036a1bbdf0320998184df2303c9cd 100644 (file)
@@ -55,7 +55,7 @@ Inside of your *path operation function*, pass your task function to the *backgr
 
 Using `BackgroundTasks` also works with the dependency injection system, you can declare a parameter of type `BackgroundTasks` at multiple levels: in a *path operation function*, in a dependency (dependable), in a sub-dependency, etc.
 
-**FastAPI** knows what to do in each case and how to re-use the same object, so that all the background tasks are merged together and are run in the background afterwards:
+**FastAPI** knows what to do in each case and how to reuse the same object, so that all the background tasks are merged together and are run in the background afterwards:
 
 === "Python 3.10+"
 
index eaab51d1b1f389c979378a5d6b9b5021cfcbef14..082417f11fa660ec4e282451c79ba8f706924669 100644 (file)
@@ -107,7 +107,7 @@ These dependencies can `raise` exceptions, the same as normal dependencies:
 
 And they can return values or not, the values won't be used.
 
-So, you can re-use a normal dependency (that returns a value) you already use somewhere else, and even though the value won't be used, the dependency will be executed:
+So, you can reuse a normal dependency (that returns a value) you already use somewhere else, and even though the value won't be used, the dependency will be executed:
 
 === "Python 3.9+"
 
index 1cb469a805120296954ec16f7c80432cfe913def..e5def9b7dd61a3310bd450a4311913e8b7165be8 100644 (file)
@@ -157,7 +157,7 @@ query_extractor --> query_or_cookie_extractor --> read_query
 
 If one of your dependencies is declared multiple times for the same *path operation*, for example, multiple dependencies have a common sub-dependency, **FastAPI** will know to call that sub-dependency only once per request.
 
-And it will save the returned value in a <abbr title="A utility/system to store computed/generated values, to re-use them instead of computing them again.">"cache"</abbr> and pass it to all the "dependants" that need it in that specific request, instead of calling the dependency multiple times for the same request.
+And it will save the returned value in a <abbr title="A utility/system to store computed/generated values, to reuse them instead of computing them again.">"cache"</abbr> and pass it to all the "dependants" that need it in that specific request, instead of calling the dependency multiple times for the same request.
 
 In an advanced scenario where you know you need the dependency to be called at every step (possibly multiple times) in the same request instead of using the "cached" value, you can set the parameter `use_cache=False` when using `Depends`:
 
index 98ac55d1f7722f0cac67423aa73b6ab9fd9ff0eb..6133898e421e81f70674c404e222325f9f036132 100644 (file)
@@ -248,12 +248,12 @@ In this example, to be able to have both `HTTPException`s in the same code, Star
 from starlette.exceptions import HTTPException as StarletteHTTPException
 ```
 
-### Re-use **FastAPI**'s exception handlers
+### Reuse **FastAPI**'s exception handlers
 
-If you want to use the exception along with the same default exception handlers from  **FastAPI**, You can import and re-use the default exception handlers from `fastapi.exception_handlers`:
+If you want to use the exception along with the same default exception handlers from  **FastAPI**, You can import and reuse the default exception handlers from `fastapi.exception_handlers`:
 
 ```Python hl_lines="2-5  15  21"
 {!../../../docs_src/handling_errors/tutorial006.py!}
 ```
 
-In this example you are just `print`ing the error with a very expressive message, but you get the idea. You can use the exception and then just re-use the default exception handlers.
+In this example you are just `print`ing the error with a very expressive message, but you get the idea. You can use the exception and then just reuse the default exception handlers.