Address code review suggestions for PR #2264

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-03-03 14:58:52 +00:00
parent 9f81fbf28a
commit 50fc4e5774
2 changed files with 28 additions and 12 deletions

View File

@@ -14,6 +14,12 @@ class TestCrewBaseLinting:
@agent
def agent_one(self) -> Agent:
"""
Creates a test agent for validation purposes.
Returns:
Agent: A configured test agent instance
"""
return Agent(
role="Test Agent",
goal="Test Goal",
@@ -22,7 +28,12 @@ class TestCrewBaseLinting:
@task
def task_one(self) -> Task:
# Create a task with an agent assigned to it
"""
Creates a test task with an agent assigned to it.
Returns:
Task: A configured test task instance with an agent assigned
"""
return Task(
description="Test Description",
expected_output="Test Output",
@@ -31,7 +42,13 @@ class TestCrewBaseLinting:
@crew
def crew(self) -> Crew:
# Access self.agents and self.tasks to verify no linting errors
"""
Creates a test crew with agents and tasks.
This method accesses self.agents and self.tasks to verify no linting errors.
Returns:
Crew: A configured test crew instance
"""
return Crew(
agents=self.agents, # Should not cause linting errors
tasks=self.tasks, # Should not cause linting errors