Skip to content

Commit f7a5a28

Browse files
Unshurejsamuel1
authored andcommitted
fix: Fix docs warnings (strands-agents#303)
1 parent 90fbe70 commit f7a5a28

File tree

11 files changed

+28
-29
lines changed

11 files changed

+28
-29
lines changed

src/strands/agent/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,9 @@ def structured_output(self, output_model: Type[T], prompt: Optional[str] = None)
453453
instruct the model to output the structured data.
454454
455455
Args:
456-
output_model(Type[BaseModel]): The output model (a JSON schema written as a Pydantic BaseModel)
456+
output_model: The output model (a JSON schema written as a Pydantic BaseModel)
457457
that the agent will use when responding.
458-
prompt(Optional[str]): The prompt to use for the agent.
458+
prompt: The prompt to use for the agent.
459459
"""
460460
messages = self.messages
461461
if not messages and not prompt:

src/strands/agent/conversation_manager/null_conversation_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ def apply_management(self, _agent: "Agent") -> None:
2323
"""Does nothing to the conversation history.
2424
2525
Args:
26-
agent: The agent whose conversation history will remain unmodified.
26+
_agent: The agent whose conversation history will remain unmodified.
2727
"""
2828
pass
2929

3030
def reduce_context(self, _agent: "Agent", e: Optional[Exception] = None) -> None:
3131
"""Does not reduce context and raises an exception.
3232
3333
Args:
34-
agent: The agent whose conversation history will remain unmodified.
34+
_agent: The agent whose conversation history will remain unmodified.
3535
e: The exception that triggered the context reduction, if any.
3636
3737
Raises:

src/strands/models/anthropic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,8 @@ def structured_output(
382382
"""Get structured output from the model.
383383
384384
Args:
385-
output_model(Type[BaseModel]): The output model to use for the agent.
386-
prompt(Messages): The prompt messages to use for the agent.
385+
output_model: The output model to use for the agent.
386+
prompt: The prompt messages to use for the agent.
387387
388388
Yields:
389389
Model events with the last being the structured output.

src/strands/models/bedrock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ def structured_output(
525525
"""Get structured output from the model.
526526
527527
Args:
528-
output_model(Type[BaseModel]): The output model to use for the agent.
529-
prompt(Messages): The prompt messages to use for the agent.
528+
output_model: The output model to use for the agent.
529+
prompt: The prompt messages to use for the agent.
530530
531531
Yields:
532532
Model events with the last being the structured output.

src/strands/models/litellm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ def structured_output(
110110
"""Get structured output from the model.
111111
112112
Args:
113-
output_model(Type[BaseModel]): The output model to use for the agent.
114-
prompt(Messages): The prompt messages to use for the agent.
113+
output_model: The output model to use for the agent.
114+
prompt: The prompt messages to use for the agent.
115115
116116
Yields:
117117
Model events with the last being the structured output.

src/strands/models/llamaapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ def structured_output(
395395
"""Get structured output from the model.
396396
397397
Args:
398-
output_model(Type[BaseModel]): The output model to use for the agent.
399-
prompt(Messages): The prompt messages to use for the agent.
398+
output_model: The output model to use for the agent.
399+
prompt: The prompt messages to use for the agent.
400400
401401
Yields:
402402
Model events with the last being the structured output.

src/strands/models/ollama.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ def structured_output(
321321
"""Get structured output from the model.
322322
323323
Args:
324-
output_model(Type[BaseModel]): The output model to use for the agent.
325-
prompt(Messages): The prompt messages to use for the agent.
324+
output_model: The output model to use for the agent.
325+
prompt: The prompt messages to use for the agent.
326326
327327
Yields:
328328
Model events with the last being the structured output.

src/strands/models/openai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ def structured_output(
145145
"""Get structured output from the model.
146146
147147
Args:
148-
output_model(Type[BaseModel]): The output model to use for the agent.
149-
prompt(Messages): The prompt messages to use for the agent.
148+
output_model: The output model to use for the agent.
149+
prompt: The prompt messages to use for the agent.
150150
151151
Yields:
152152
Model events with the last being the structured output.

src/strands/tools/decorator.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -530,15 +530,14 @@ def tool( # type: ignore
530530
```python
531531
@tool
532532
def my_tool(name: str, count: int = 1) -> str:
533-
'''Does something useful with the provided parameters.
534-
535-
Args:
536-
name: The name to process
537-
count: Number of times to process (default: 1)
538-
539-
Returns:
540-
A message with the result
541-
'''
533+
# Does something useful with the provided parameters.
534+
#
535+
# Parameters:
536+
# name: The name to process
537+
# count: Number of times to process (default: 1)
538+
#
539+
# Returns:
540+
# A message with the result
542541
return f"Processed {name} {count} times"
543542
544543
agent = Agent(tools=[my_tool])

src/strands/types/models/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def structured_output(
5050
"""Get structured output from the model.
5151
5252
Args:
53-
output_model(Type[BaseModel]): The output model to use for the agent.
54-
prompt(Messages): The prompt messages to use for the agent.
53+
output_model: The output model to use for the agent.
54+
prompt: The prompt messages to use for the agent.
5555
5656
Yields:
5757
Model events with the last being the structured output.

0 commit comments

Comments
 (0)