From 8b423d9a1b68cc32f9e542b681f935e5ba9736bf Mon Sep 17 00:00:00 2001 From: Renato Nitta Date: Mon, 20 Apr 2026 19:38:34 -0300 Subject: [PATCH] test: cast InternalCrew via Any to guide static analyzer --- lib/crewai/tests/test_project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/crewai/tests/test_project.py b/lib/crewai/tests/test_project.py index 2f0ab8f2c..c0633dc40 100644 --- a/lib/crewai/tests/test_project.py +++ b/lib/crewai/tests/test_project.py @@ -1,4 +1,4 @@ -from typing import Any, ClassVar +from typing import Any, ClassVar, cast from unittest.mock import Mock, create_autospec, patch import pytest @@ -263,7 +263,7 @@ def test_crew_name(): def test_crew_decorator_propagates_class_name_to_instance(): """@crew-decorated factory method should set Crew.name to the decorated class name.""" - crew_instance: Crew = InternalCrew().crew() + crew_instance: Crew = cast(Any, InternalCrew()).crew() assert crew_instance.name == "InternalCrew"