From dd201824e72391660ee86e0b8b0812939b5d935b Mon Sep 17 00:00:00 2001 From: Anirudh Vempati <40335580+notrudyyy@users.noreply.github.com> Date: Fri, 14 Nov 2025 13:48:57 +0530 Subject: [PATCH] Fix grammar issues in docs/dependencies.md Fixes a few tiny grammar issues in the Dependencies page of the docs. --- docs/dependencies.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/dependencies.md b/docs/dependencies.md index aa01bc5a62..474b85fc7d 100644 --- a/docs/dependencies.md +++ b/docs/dependencies.md @@ -2,7 +2,7 @@ Pydantic AI uses a dependency injection system to provide data and services to your agent's [system prompts](agents.md#system-prompts), [tools](tools.md) and [output validators](output.md#output-validator-functions). -Matching Pydantic AI's design philosophy, our dependency system tries to use existing best practice in Python development rather than inventing esoteric "magic", this should make dependencies type-safe, understandable easier to test and ultimately easier to deploy in production. +Matching Pydantic AI's design philosophy, our dependency system tries to use existing best practice in Python development rather than inventing esoteric "magic", this should make dependencies type-safe, understandable, easier to test, and ultimately easier to deploy in production. ## Defining Dependencies @@ -103,11 +103,11 @@ _(This example is complete, it can be run "as is" — you'll need to add `asynci [System prompt functions](agents.md#system-prompts), [function tools](tools.md) and [output validators](output.md#output-validator-functions) are all run in the async context of an agent run. If these functions are not coroutines (e.g. `async def`) they are called with -[`run_in_executor`][asyncio.loop.run_in_executor] in a thread pool, it's therefore marginally preferable +[`run_in_executor`][asyncio.loop.run_in_executor] in a thread pool. It's therefore marginally preferable to use `async` methods where dependencies perform IO, although synchronous dependencies should work fine too. !!! note "`run` vs. `run_sync` and Asynchronous vs. Synchronous dependencies" - Whether you use synchronous or asynchronous dependencies, is completely independent of whether you use `run` or `run_sync` — `run_sync` is just a wrapper around `run` and agents are always run in an async context. + Whether you use synchronous or asynchronous dependencies is completely independent of whether you use `run` or `run_sync` — `run_sync` is just a wrapper around `run` and agents are always run in an async context. Here's the same example as above, but with a synchronous dependency: