fix: improve type annotations across codebase

This commit is contained in:
Greyson LaLonde
2025-09-03 22:29:41 -04:00
parent 43880b49a6
commit b94fbd3d3a
7 changed files with 318 additions and 289 deletions

View File

@@ -13,14 +13,14 @@ class CacheTools(BaseModel):
default_factory=CacheHandler,
)
def tool(self):
def tool(self) -> CrewStructuredTool:
return CrewStructuredTool.from_function(
func=self.hit_cache,
name=self.name,
description="Reads directly from the cache",
)
def hit_cache(self, key):
def hit_cache(self, key: str) -> str:
split = key.split("tool:")
tool = split[1].split("|input:")[0].strip()
tool_input = split[1].split("|input:")[1].strip()