A programming framework for agentic AI
Check for prints (#616)
Jack Gerritsdc02719f7c4b
diff --git a/python/packages/agbench/pyproject.toml b/python/packages/agbench/pyproject.tomlindex 615dd5f0c..dd69773bb 100644--- a/python/packages/agbench/pyproject.toml+++ b/python/packages/agbench/pyproject.toml@@ -45,6 +45,10 @@ include = ["src/**"]+[tool.ruff.lint]+# Allow prints in this package+ignore = ["T20"]+[tool.pyright]extends = "../../pyproject.toml"include = ["src"]diff --git a/python/packages/autogen-core/pyproject.toml b/python/packages/autogen-core/pyproject.tomlindex 979e45ff8..cb7f9a9e2 100644--- a/python/packages/autogen-core/pyproject.toml+++ b/python/packages/autogen-core/pyproject.toml@@ -74,6 +74,10 @@ extend = "../../pyproject.toml"exclude = ["build", "dist", "src/autogen_core/application/protos"]include = ["src/**", "samples/*.py", "docs/**/*.ipynb", "tests/**"]+[tool.ruff.lint.per-file-ignores]+"samples/**.py" = ["T20"]+"docs/**.ipynb" = ["T20"]+[tool.pyright]extends = "../../pyproject.toml"include = ["src", "tests", "samples"]diff --git a/python/packages/autogen-core/samples/patterns/group_chat.py b/python/packages/autogen-core/samples/patterns/group_chat.pyindex c5fc6dddd..54e93f038 100644--- a/python/packages/autogen-core/samples/patterns/group_chat.py+++ b/python/packages/autogen-core/samples/patterns/group_chat.py@@ -19,8 +19,7 @@ from typing import Listfrom autogen_core.application import SingleThreadedAgentRuntimefrom autogen_core.base import AgentId, AgentInstantiationContext-from autogen_core.components import DefaultTopicId, RoutedAgent, message_handler-from autogen_core.components import DefaultSubscription+from autogen_core.components import DefaultSubscription, DefaultTopicId, RoutedAgent, message_handlerfrom autogen_core.components.models import (AssistantMessage,ChatCompletionClient,diff --git a/python/packages/autogen-core/tests/execution/test_user_defined_functions.py b/python/packages/autogen-core/tests/execution/test_user_defined_functions.pyindex 7b92df1d7..d4dec54d0 100644--- a/python/packages/autogen-core/tests/execution/test_user_defined_functions.py+++ b/python/packages/autogen-core/tests/execution/test_user_defined_functions.py@@ -395,6 +395,5 @@ def add_two_numbers(a: int, b: int) -> int:cancellation_token=cancellation_token,)# result.output = result.output.encode().decode('unicode_escape')- print(azure_result.output)assert "TypeError: unsupported operand type(s) for +:" in azure_result.outputassert azure_result.exit_code == 1diff --git a/python/packages/autogen-core/tests/test_closure_agent.py b/python/packages/autogen-core/tests/test_closure_agent.pyindex 4b4482e22..a8731bca3 100644--- a/python/packages/autogen-core/tests/test_closure_agent.py+++ b/python/packages/autogen-core/tests/test_closure_agent.py@@ -4,8 +4,7 @@ from dataclasses import dataclassimport pytestfrom autogen_core.application import SingleThreadedAgentRuntimefrom autogen_core.base import AgentId, AgentRuntime, MessageContext-from autogen_core.components import ClosureAgent-from autogen_core.components import DefaultSubscription+from autogen_core.components import ClosureAgent, DefaultSubscriptionfrom autogen_core.components._default_topic import DefaultTopicIddiff --git a/python/packages/autogen-core/tests/test_subscription.py b/python/packages/autogen-core/tests/test_subscription.pyindex 7a5403f99..c339d549b 100644--- a/python/packages/autogen-core/tests/test_subscription.py+++ b/python/packages/autogen-core/tests/test_subscription.py@@ -2,8 +2,7 @@ import pytestfrom autogen_core.application import SingleThreadedAgentRuntimefrom autogen_core.base import AgentId, TopicIdfrom autogen_core.base.exceptions import CantHandleException-from autogen_core.components import DefaultTopicId, TypeSubscription-from autogen_core.components import DefaultSubscription+from autogen_core.components import DefaultSubscription, DefaultTopicId, TypeSubscriptionfrom test_utils import LoopbackAgent, MessageTypediff --git a/python/packages/team-one/pyproject.toml b/python/packages/team-one/pyproject.tomlindex 05a962d8d..56a978046 100644--- a/python/packages/team-one/pyproject.toml+++ b/python/packages/team-one/pyproject.toml@@ -72,6 +72,9 @@ include = ["tests/**/*.py",]+[tool.ruff.lint.per-file-ignores]+"src/team_one/utils.py" = ["T20"]+[tool.pyright]extends = "../../pyproject.toml"diff --git a/python/packages/team-one/src/team_one/agents/multimodal_web_surfer/multimodal_web_surfer.py b/python/packages/team-one/src/team_one/agents/multimodal_web_surfer/multimodal_web_surfer.pyindex a250f321a..3032770c1 100644--- a/python/packages/team-one/src/team_one/agents/multimodal_web_surfer/multimodal_web_surfer.py+++ b/python/packages/team-one/src/team_one/agents/multimodal_web_surfer/multimodal_web_surfer.py@@ -196,7 +196,7 @@ setInterval(function() {{""".strip(),)await self._page.screenshot(path=os.path.join(self.debug_dir, "screenshot.png"))- print(f"Multimodal Web Surfer debug screens: {pathlib.Path(os.path.abspath(debug_html)).as_uri()}\n")+ logger.info(f"Multimodal Web Surfer debug screens: {pathlib.Path(os.path.abspath(debug_html)).as_uri()}\n")async def _reset(self, cancellation_token: CancellationToken) -> None:assert self._page is not Nonediff --git a/python/pyproject.toml b/python/pyproject.tomlindex 29f587cbd..0876217e1 100644--- a/python/pyproject.toml+++ b/python/pyproject.toml@@ -33,7 +33,7 @@ target-version = "py310"docstring-code-format = true[tool.ruff.lint]-select = ["E", "F", "W", "B", "Q", "I", "ASYNC"]+select = ["E", "F", "W", "B", "Q", "I", "ASYNC", "T20"]ignore = ["F401", "E501"][tool.ruff.lint.flake8-tidy-imports]