Skip to content

Commit 80ff067

Browse files
didier-durandcopybara-github
authored andcommitted
docs: fixing typo in multiple files
Merge #3944 ### Link to Issue or Description of Change **1. Link to an existing issue (if applicable):** N/A **2. Or, if no issue exists, describe the change:** fixing various typos in multiple files: see commit diffs for details **Problem:** Discovered typos while reading ADK repo **Solution:** Submitted this PR to fix them ### Testing Plan N/A: changes only in comments, .md and docstrings. **Unit Tests:** - [N/A ] I have added or updated unit tests for my change. - [X] All unit tests pass locally. _Please include a summary of passed `pytest` results._ **Manual End-to-End (E2E) Tests:** N/A ### Checklist - [X] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document. - [X] I have performed a self-review of my own code. - [N/A] I have commented my code, particularly in hard-to-understand areas. - [N/A] I have added tests that prove my fix is effective or that my feature works. - [X] New and existing unit tests pass locally with my changes. - [N/A] I have manually tested my changes end-to-end. - [N/A] Any dependent changes have been merged and published in downstream modules. ### Additional context N/A COPYBARA_INTEGRATE_REVIEW=#3944 from didier-durand:fix-typos-a 02378a4 PiperOrigin-RevId: 868245940
1 parent e0b9712 commit 80ff067

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

contributing/samples/gepa/adk_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def _adk_agent(
159159

160160

161161
class _UserAgent(base_agent.BaseAgent):
162-
"""An agent that wraps the provided environment and simulates an user."""
162+
"""An agent that wraps the provided environment and simulates a user."""
163163

164164
env: Env
165165

contributing/samples/gepa/tau_bench_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def solve(
103103
max_num_steps: The maximum number of steps to run the agent.
104104
105105
Returns:
106-
The result of the solve.
106+
The result of the solve function.
107107
108108
Raises:
109109
- ValueError: If the LLM inference failed.

src/google/adk/agents/llm_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ async def _run_async_impl(
469469
self.__maybe_save_output_to_state(event)
470470
yield event
471471
if ctx.should_pause_invocation(event):
472-
# Do not pause immediately, wait until the long running tool call is
472+
# Do not pause immediately, wait until the long-running tool call is
473473
# executed.
474474
should_pause = True
475475
if should_pause:
@@ -479,7 +479,7 @@ async def _run_async_impl(
479479
events = ctx._get_events(current_invocation=True, current_branch=True)
480480
if events and any(ctx.should_pause_invocation(e) for e in events[-2:]):
481481
return
482-
# Only yield an end state if the last event is no longer a long running
482+
# Only yield an end state if the last event is no longer a long-running
483483
# tool call.
484484
ctx.set_agent_state(self.name, end_of_agent=True)
485485
yield self._create_agent_state_event(ctx)

src/google/adk/models/gemini_llm_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ async def send_realtime(self, input: RealtimeInput):
142142
def __build_full_text_response(self, text: str):
143143
"""Builds a full text response.
144144
145-
The text should not partial and the returned LlmResponse is not be
145+
The text should not be partial and the returned LlmResponse is not
146146
partial.
147147
148148
Args:

src/google/adk/models/gemma_llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def _get_last_valid_json_substring(text: str) -> tuple[bool, str | None]:
323323
"""Attempts to find and return the last valid JSON object in a string.
324324
325325
This function is designed to extract JSON that might be embedded in a larger
326-
text, potentially with introductory or concluding remarks. It will always chose
326+
text, potentially with introductory or concluding remarks. It will always choose
327327
the last block of valid json found within the supplied text (if it exists).
328328
329329
Args:

src/google/adk/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ async def prepare_auth_credentials(
321321
credential = existing_credential or self.auth_credential
322322
# fetch credential from adk framework
323323
# Some auth scheme like OAuth2 AuthCode & OpenIDConnect may require
324-
# multi-step exchange:
324+
# multistep exchange:
325325
# client_id , client_secret -> auth_uri -> auth_code -> access_token
326326
# adk framework supports exchange access_token already
327327
# for other credential, adk can also get back the credential directly

tests/integration/fixture/home_automation_agent/agent.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,29 +138,29 @@ def set_device_info(
138138

139139

140140
def get_temperature(location: str) -> int:
141-
"""Get the current temperature in celsius of a location (e.g., 'Living Room', 'Bedroom', 'Kitchen').
141+
"""Get the current temperature in Celsius of a location (e.g., 'Living Room', 'Bedroom', 'Kitchen').
142142
143143
Args:
144144
location (str): The location for which to retrieve the temperature (e.g.,
145145
'Living Room', 'Bedroom', 'Kitchen').
146146
147147
Returns:
148-
int: The current temperature in celsius in the specified location, or
148+
int: The current temperature in Celsius in the specified location, or
149149
'Location not found' if the location does not exist.
150150
"""
151151
return TEMPERATURE_DB.get(location, "Location not found")
152152

153153

154154
def set_temperature(location: str, temperature: int) -> str:
155-
"""Set the desired temperature in celsius for a location.
155+
"""Set the desired temperature in Celsius for a location.
156156
157-
Acceptable range of temperature: 18-30 celsius. If it's out of the range, do
157+
Acceptable range of temperature: 18-30 Celsius. If it's out of the range, do
158158
not call this tool.
159159
160160
Args:
161161
location (str): The location where the temperature should be set.
162-
temperature (int): The desired temperature as integer to set in celsius.
163-
Acceptable range: 18-30 celsius.
162+
temperature (int): The desired temperature as integer to set in Celsius.
163+
Acceptable range: 18-30 Celsius.
164164
165165
Returns:
166166
str: A message indicating whether the temperature was successfully set.

0 commit comments

Comments
 (0)