mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 00:58:30 +00:00
Fix linting and type-checker issues
This commit is contained in:
@@ -180,7 +180,7 @@ class Task(BaseModel):
|
|||||||
tools: Optional[List[Any]] = None,
|
tools: Optional[List[Any]] = None,
|
||||||
) -> Future[TaskOutput]:
|
) -> Future[TaskOutput]:
|
||||||
"""Execute the task asynchronously."""
|
"""Execute the task asynchronously."""
|
||||||
future = Future()
|
future: Future[TaskOutput] = Future()
|
||||||
threading.Thread(
|
threading.Thread(
|
||||||
target=self._execute_task_async, args=(agent, context, tools, future)
|
target=self._execute_task_async, args=(agent, context, tools, future)
|
||||||
).start()
|
).start()
|
||||||
@@ -388,7 +388,6 @@ class Task(BaseModel):
|
|||||||
converter.to_pydantic() if self.output_pydantic else converter.to_json()
|
converter.to_pydantic() if self.output_pydantic else converter.to_json()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if isinstance(exported_result, ConverterError):
|
if isinstance(exported_result, ConverterError):
|
||||||
Printer().print(
|
Printer().print(
|
||||||
content=f"{exported_result.message} Using raw output instead.",
|
content=f"{exported_result.message} Using raw output instead.",
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ from unittest.mock import patch
|
|||||||
|
|
||||||
import pydantic_core
|
import pydantic_core
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from crewai.agent import Agent
|
from crewai.agent import Agent
|
||||||
from crewai.agents.cache import CacheHandler
|
from crewai.agents.cache import CacheHandler
|
||||||
from crewai.crew import Crew
|
from crewai.crew import Crew
|
||||||
@@ -709,7 +708,6 @@ def test_kickoff_for_each_single_input():
|
|||||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||||
def test_kickoff_for_each_multiple_inputs():
|
def test_kickoff_for_each_multiple_inputs():
|
||||||
"""Tests if kickoff_for_each works with multiple inputs."""
|
"""Tests if kickoff_for_each works with multiple inputs."""
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
inputs = [
|
inputs = [
|
||||||
{"topic": "dog"},
|
{"topic": "dog"},
|
||||||
@@ -1084,7 +1082,6 @@ def test_code_execution_flag_adds_code_tool_upon_kickoff():
|
|||||||
|
|
||||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||||
def test_delegation_is_not_enabled_if_there_are_only_one_agent():
|
def test_delegation_is_not_enabled_if_there_are_only_one_agent():
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
researcher = Agent(
|
researcher = Agent(
|
||||||
role="Researcher",
|
role="Researcher",
|
||||||
|
|||||||
Reference in New Issue
Block a user