mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
feat: update typechecking
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user