refactor: remove redundant comments and docstrings (#6527)
* refactor: remove redundant comments and docstrings * fix(signal): annotate async context manager as a generator
This commit is contained in:
1 parent
cb3ba45317
commit
a4d2430140
922 files changed
+406
-7738
No files matched your search
@@ -1,5 +1,3 @@
|
||||
"""Test message tool suppress logic for final replies."""
|
||||
|
||||
import asyncio
|
||||
from pathlib import Path
|
||||
from unittest.mock import AsyncMock, MagicMock
|
||||
@@ -23,7 +21,6 @@ def _make_loop(tmp_path: Path) -> AgentLoop:
|
||||
|
||||
|
||||
class TestMessageToolSuppressLogic:
|
||||
"""Final reply suppressed only when message tool sends to the same target."""
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize("ephemeral", [False, True])
|
||||
@@ -53,7 +50,7 @@ class TestMessageToolSuppressLogic:
|
||||
result = await loop._process_message(msg, ephemeral=ephemeral)
|
||||
|
||||
assert len(sent) == 1
|
||||
assert result is None # suppressed
|
||||
assert result is None
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_not_suppress_when_sent_to_different_target(self, tmp_path: Path) -> None:
|
||||
@@ -79,7 +76,7 @@ class TestMessageToolSuppressLogic:
|
||||
|
||||
assert len(sent) == 1
|
||||
assert sent[0].channel == "email"
|
||||
assert result is not None # not suppressed
|
||||
assert result is not None
|
||||
assert result.channel == "feishu"
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in new issue
Block a user