From dc1902ff442a7252d0effed3e84253567048fdd8 Mon Sep 17 00:00:00 2001 From: Eduardo Chiarotti Date: Tue, 8 Oct 2024 17:41:49 -0300 Subject: [PATCH] feat: update typechecking --- src/crewai/project/crew_base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crewai/project/crew_base.py b/src/crewai/project/crew_base.py index 2ecf50e13..91b2c5a92 100644 --- a/src/crewai/project/crew_base.py +++ b/src/crewai/project/crew_base.py @@ -1,6 +1,6 @@ import inspect from pathlib import Path -from typing import Any, Callable, Dict, Type, TypeVar +from typing import Any, Callable, Dict, Type, TypeVar, cast import yaml from dotenv import load_dotenv @@ -11,7 +11,7 @@ T = TypeVar("T", bound=Type[Any]) def CrewBase(cls: T) -> T: - class WrappedClass(cls): + class WrappedClass(cls): # type: ignore is_crew_class: bool = True # type: ignore # Get the directory of the class being decorated @@ -180,4 +180,4 @@ def CrewBase(cls: T) -> T: callback_functions[callback]() for callback in callbacks ] - return WrappedClass + return cast(T, WrappedClass)