fix: add type annotations and exclude tests from mypy

- Add type: ignore for mem0 import
- Fix tool_usage.py cache_function None check
- Change _execute_without_timeout return type to Any
- Add type annotations to multiple functions:
  - add_sources() -> None
  - log() with proper parameter types
  - stop_rpm_counter() -> None
  - EventListener.__new__() -> Self
  - setup_listeners() -> None
  - Memory class __init__ methods -> None
  - TaskEvaluator.__init__() -> None
  - get_skipped_task_output() -> TaskOutput
- Exclude tests directory from mypy checks in pyproject.toml
- Update deprecated typing imports to use built-in types
This commit is contained in:
Greyson LaLonde
2025-09-04 11:11:59 -04:00
parent 0bab041531
commit 2ba48dd82a
13 changed files with 99 additions and 94 deletions

View File

@@ -123,7 +123,7 @@ select = [
[tool.mypy]
strict = true
exclude = ["src/crewai/cli/templates"]
exclude = ["src/crewai/cli/templates", "tests"]
[tool.bandit]
exclude_dirs = ["src/crewai/cli/templates"]