Skip to content

Commit 8624ef0

Browse files
committed
Added type hints in AgentAppMapping
1 parent 50cc24e commit 8624ef0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/google/adk/cli/fast_api.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from typing import Awaitable
2727
from typing import Callable
2828
from typing import Literal
29-
from typing import Mapping
29+
from typing import Mapping, Iterator
3030

3131
import click
3232
from fastapi import FastAPI
@@ -71,10 +71,10 @@
7171

7272
class AgentAppMapping(Mapping[str, str]):
7373

74-
def __init__(self, agent_loader):
74+
def __init__(self, agent_loader: Any) -> None:
7575
self.agent_loader = agent_loader
7676

77-
def __getitem__(self, app_name):
77+
def __getitem__(self, app_name: str) -> str:
7878
for folder_name in self.agent_loader.list_agents():
7979
try:
8080
loaded = self.agent_loader.load_agent(folder_name)
@@ -84,10 +84,10 @@ def __getitem__(self, app_name):
8484
pass
8585
return app_name
8686

87-
def __iter__(self):
87+
def __iter__(self) -> Iterator[str]:
8888
return iter([])
8989

90-
def __len__(self):
90+
def __len__(self) -> int:
9191
return 1
9292

9393

0 commit comments

Comments
 (0)