Skip to content

Commit 8a9a271

Browse files
Jacksunweicopybara-github
authored andcommitted
fix(config): Fixes SequentialAgent.config_type type hint
Without ClassVar, it will cause pydantic to generate warning. PiperOrigin-RevId: 795518646
1 parent a2832d5 commit 8a9a271

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/google/adk/agents/llm_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class LlmAgent(BaseAgent):
130130
When not set, the agent will inherit the model from its ancestor.
131131
"""
132132

133-
config_type: ClassVar[type[BaseAgentConfig]] = LlmAgentConfig
133+
config_type: ClassVar[Type[BaseAgentConfig]] = LlmAgentConfig
134134
"""The config type for this agent."""
135135

136136
instruction: Union[str, InstructionProvider] = ''

src/google/adk/agents/sequential_agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from __future__ import annotations
1818

1919
from typing import AsyncGenerator
20+
from typing import ClassVar
2021
from typing import Type
2122

2223
from typing_extensions import override
@@ -33,7 +34,7 @@
3334
class SequentialAgent(BaseAgent):
3435
"""A shell agent that runs its sub-agents in sequence."""
3536

36-
config_type: Type[BaseAgentConfig] = SequentialAgentConfig
37+
config_type: ClassVar[Type[BaseAgentConfig]] = SequentialAgentConfig
3738
"""The config type for this agent."""
3839

3940
@override

0 commit comments

Comments
 (0)