feat: update typechecking

This commit is contained in:
Eduardo Chiarotti
2024-10-08 17:41:49 -03:00
parent 6d90ac3fc3
commit dc1902ff44

View File

@@ -1,6 +1,6 @@
import inspect import inspect
from pathlib import Path from pathlib import Path
from typing import Any, Callable, Dict, Type, TypeVar from typing import Any, Callable, Dict, Type, TypeVar, cast
import yaml import yaml
from dotenv import load_dotenv from dotenv import load_dotenv
@@ -11,7 +11,7 @@ T = TypeVar("T", bound=Type[Any])
def CrewBase(cls: T) -> T: def CrewBase(cls: T) -> T:
class WrappedClass(cls): class WrappedClass(cls): # type: ignore
is_crew_class: bool = True # type: ignore is_crew_class: bool = True # type: ignore
# Get the directory of the class being decorated # Get the directory of the class being decorated
@@ -180,4 +180,4 @@ def CrewBase(cls: T) -> T:
callback_functions[callback]() for callback in callbacks callback_functions[callback]() for callback in callbacks
] ]
return WrappedClass return cast(T, WrappedClass)