Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all pre-commit errors #743

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/crewai/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__all__ = ["Agent", "Crew", "Process", "Task"]
from crewai.agent import Agent
from crewai.crew import Crew
from crewai.process import Process
Expand Down
1 change: 1 addition & 0 deletions src/crewai/agents/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__all__ = ["CacheHandler", "CrewAgentExecutor", "CrewAgentParser", "ToolsHandler"]
from .cache.cache_handler import CacheHandler
from .executor import CrewAgentExecutor
from .parser import CrewAgentParser
Expand Down
1 change: 1 addition & 0 deletions src/crewai/agents/cache/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
__all__ = ["CacheHandler"]
from .cache_handler import CacheHandler
1 change: 1 addition & 0 deletions src/crewai/memory/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__all__ = ["EntityMemory", "LongTermMemory", "ShortTermMemory"]
from .entity.entity_memory import EntityMemory
from .long_term.long_term_memory import LongTermMemory
from .short_term.short_term_memory import ShortTermMemory
1 change: 1 addition & 0 deletions src/crewai/project/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
__all__ = ["agent", "crew", "task", "CrewBase"]
from .annotations import agent, crew, task
from .crew_base import CrewBase
1 change: 1 addition & 0 deletions src/crewai/telemetry/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
__all__ = ["Telemetry"]
from .telemetry import Telemetry
12 changes: 12 additions & 0 deletions src/crewai/utilities/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
__all__ = [
"Converter",
"ConverterError",
"I18N",
"Instructor",
"Logger",
"Printer",
"Prompts",
"RPMController",
"FileHandler",
"YamlParser",
]
from .converter import Converter, ConverterError
from .i18n import I18N
from .instructor import Instructor
Expand Down
2 changes: 1 addition & 1 deletion src/crewai/utilities/fileHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ def __init__(self, file_path):
def log(self, **kwargs):
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
message = f"{now}: ".join([f"{key}={value}" for key, value in kwargs.items()])
with open(self._path, "a", encoding = 'utf-8') as file:
with open(self._path, "a", encoding="utf-8") as file:
file.write(message + "\n")
1 change: 0 additions & 1 deletion src/crewai/utilities/logger.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from datetime import datetime
from crewai.utilities.printer import Printer
from datetime import datetime


class Logger:
Expand Down
2 changes: 2 additions & 0 deletions tests/agent_tools/agent_tools_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def test_ask_question():
== "As an AI researcher, I don't have personal feelings or emotions like love or hate. However, I recognize the importance of AI Agents in today's technological landscape. They have the potential to greatly enhance our lives and make tasks more efficient. At the same time, it is crucial to consider the ethical implications and societal impacts that come with their use. My role is to provide objective research and analysis on these topics."
)


@pytest.mark.vcr(filter_headers=["authorization"])
def test_ask_question_with_wrong_co_worker_variable():
result = tools.ask_question(
Expand All @@ -68,6 +69,7 @@ def test_ask_question_with_wrong_co_worker_variable():
== "No, I don't hate AI agents. In fact, I find them quite fascinating. They are powerful tools that can greatly assist in various tasks, including my research. As a technology researcher, AI and AI agents are subjects of interest to me due to their potential in advancing our understanding and capabilities in various fields. My supposed love for them stems from this professional interest and the potential they hold."
)


@pytest.mark.vcr(filter_headers=["authorization"])
def test_delegate_work_withwith_coworker_as_array():
result = tools.delegate_work(
Expand Down
5 changes: 1 addition & 4 deletions tests/memory/short_term_memory_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ def short_term_memory():
expected_output="A list of relevant URLs based on the search query.",
agent=agent,
)
return ShortTermMemory(crew=Crew(
agents=[agent],
tasks=[task]
))
return ShortTermMemory(crew=Crew(agents=[agent], tasks=[task]))


@pytest.mark.vcr(filter_headers=["authorization"])
Expand Down