]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
✏️ Fix typos in comments on internal code in `fastapi/concurrency.py` and `fastapi...
authorElliottLarsen <86161304+ElliottLarsen@users.noreply.github.com>
Sat, 5 Aug 2023 08:39:38 +0000 (02:39 -0600)
committerGitHub <noreply@github.com>
Sat, 5 Aug 2023 08:39:38 +0000 (10:39 +0200)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
fastapi/concurrency.py
fastapi/routing.py

index 31b878d5df8a5d1c9687a8fdbf2f377e844d7f48..754061c862dadbdfd0c57a563b76fbd0fb5497a4 100644 (file)
@@ -19,7 +19,7 @@ async def contextmanager_in_threadpool(
 ) -> AsyncGenerator[_T, None]:
     # blocking __exit__ from running waiting on a free thread
     # can create race conditions/deadlocks if the context manager itself
-    # has it's own internal pool (e.g. a database connection pool)
+    # has its own internal pool (e.g. a database connection pool)
     # to avoid this we let __exit__ run without a capacity limit
     # since we're creating a new limiter for each call, any non-zero limit
     # works (1 is arbitrary)
index 6efd40ff3bc9fefa964be83d44e10bc60b193fb0..1e3dfb4d52c888f4011104d156dfa3db2e32c87c 100644 (file)
@@ -83,7 +83,7 @@ def _prepare_response_content(
         if read_with_orm_mode:
             # Let from_orm extract the data from this model instead of converting
             # it now to a dict.
-            # Otherwise there's no way to extract lazy data that requires attribute
+            # Otherwise, there's no way to extract lazy data that requires attribute
             # access instead of dict iteration, e.g. lazy relationships.
             return res
         return _model_dump(
@@ -456,7 +456,7 @@ class APIRoute(routing.Route):
             # that doesn't have the hashed_password. But because it's a subclass, it
             # would pass the validation and be returned as is.
             # By being a new field, no inheritance will be passed as is. A new model
-            # will be always created.
+            # will always be created.
             # TODO: remove when deprecating Pydantic v1
             self.secure_cloned_response_field: Optional[
                 ModelField