Apply automatic linting fixes to src directory

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-05-12 13:30:50 +00:00
parent 807dfe0558
commit ad1ea46bbb
160 changed files with 3218 additions and 3197 deletions

View File

@@ -1,4 +1,4 @@
from typing import Any, Dict, Optional
from typing import Any
from pydantic import BaseModel, PrivateAttr
@@ -6,10 +6,10 @@ from pydantic import BaseModel, PrivateAttr
class CacheHandler(BaseModel):
"""Callback handler for tool usage."""
_cache: Dict[str, Any] = PrivateAttr(default_factory=dict)
_cache: dict[str, Any] = PrivateAttr(default_factory=dict)
def add(self, tool, input, output):
def add(self, tool, input, output) -> None:
self._cache[f"{tool}-{input}"] = output
def read(self, tool, input) -> Optional[str]:
def read(self, tool, input) -> str | None:
return self._cache.get(f"{tool}-{input}")