mirror of
				https://github.com/microsoft/autogen.git
				synced 2025-11-03 19:29:52 +00:00 
			
		
		
		
	
							parent
							
								
									0172c7131d
								
							
						
					
					
						commit
						dc02719f7c
					
				@ -45,6 +45,10 @@ include = [
 | 
			
		||||
    "src/**"
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[tool.ruff.lint]
 | 
			
		||||
# Allow prints in this package
 | 
			
		||||
ignore = ["T20"]
 | 
			
		||||
 | 
			
		||||
[tool.pyright]
 | 
			
		||||
extends = "../../pyproject.toml"
 | 
			
		||||
include = ["src"]
 | 
			
		||||
 | 
			
		||||
@ -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"]
 | 
			
		||||
 | 
			
		||||
@ -19,8 +19,7 @@ from typing import List
 | 
			
		||||
 | 
			
		||||
from autogen_core.application import SingleThreadedAgentRuntime
 | 
			
		||||
from 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_handler
 | 
			
		||||
from autogen_core.components.models import (
 | 
			
		||||
    AssistantMessage,
 | 
			
		||||
    ChatCompletionClient,
 | 
			
		||||
 | 
			
		||||
@ -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.output
 | 
			
		||||
    assert azure_result.exit_code == 1
 | 
			
		||||
 | 
			
		||||
@ -4,8 +4,7 @@ from dataclasses import dataclass
 | 
			
		||||
import pytest
 | 
			
		||||
from autogen_core.application import SingleThreadedAgentRuntime
 | 
			
		||||
from 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, DefaultSubscription
 | 
			
		||||
from autogen_core.components._default_topic import DefaultTopicId
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,8 +2,7 @@ import pytest
 | 
			
		||||
from autogen_core.application import SingleThreadedAgentRuntime
 | 
			
		||||
from autogen_core.base import AgentId, TopicId
 | 
			
		||||
from 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, TypeSubscription
 | 
			
		||||
from test_utils import LoopbackAgent, MessageType
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -72,6 +72,9 @@ include = [
 | 
			
		||||
    "tests/**/*.py",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[tool.ruff.lint.per-file-ignores]
 | 
			
		||||
"src/team_one/utils.py" = ["T20"]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[tool.pyright]
 | 
			
		||||
extends = "../../pyproject.toml"
 | 
			
		||||
 | 
			
		||||
@ -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 None
 | 
			
		||||
 | 
			
		||||
@ -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]
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user