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)