From: ElliottLarsen <86161304+ElliottLarsen@users.noreply.github.com> Date: Sat, 5 Aug 2023 08:39:38 +0000 (-0600) Subject: ✏️ Fix typos in comments on internal code in `fastapi/concurrency.py` and `fastapi... X-Git-Tag: 0.101.1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e59acd35bd00018462b6401bf78e52c91b48f70;p=thirdparty%2Ffastapi%2Ffastapi.git ✏️ Fix typos in comments on internal code in `fastapi/concurrency.py` and `fastapi/routing.py` (#9590) Co-authored-by: Marcelo Trylesinski --- diff --git a/fastapi/concurrency.py b/fastapi/concurrency.py index 31b878d5df..754061c862 100644 --- a/fastapi/concurrency.py +++ b/fastapi/concurrency.py @@ -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) diff --git a/fastapi/routing.py b/fastapi/routing.py index 6efd40ff3b..1e3dfb4d52 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -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