lint: drop mypy-style type ignore comments

This commit is contained in:
2026-08-03 23:38:32 +08:00
parent a834984bcc
commit 3449f3a77d
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -118,7 +118,7 @@ def _open_with_system_default(path: Path) -> None:
resolved = str(path.resolve()) resolved = str(path.resolve())
if sys.platform == "win32": if sys.platform == "win32":
try: try:
os.startfile(resolved) # type: ignore[attr-defined] os.startfile(resolved)
except OSError as exc: except OSError as exc:
msg = f"failed to open with system default: {exc}" msg = f"failed to open with system default: {exc}"
raise click.ClickException(msg) from exc raise click.ClickException(msg) from exc
+5 -5
View File
@@ -342,7 +342,7 @@ async def test_loop_injects_todo_review_when_untouched() -> None:
stack.begin_turn() stack.begin_turn()
client = ScriptedClient() client = ScriptedClient()
agent = ChatAgent( agent = ChatAgent(
client, # type: ignore[arg-type] client,
model="m", model="m",
tools=_todo_registry(stack), tools=_todo_registry(stack),
stream=False, stream=False,
@@ -420,7 +420,7 @@ async def test_loop_skips_todo_review_when_touched_even_if_open() -> None:
client = ScriptedClientWithTodoListThenStop() client = ScriptedClientWithTodoListThenStop()
agent = ChatAgent( agent = ChatAgent(
client, # type: ignore[arg-type] client,
model="m", model="m",
tools=_todo_registry(stack), tools=_todo_registry(stack),
stream=False, stream=False,
@@ -447,7 +447,7 @@ async def test_loop_synthetic_tool_nag_strategy() -> None:
stack.begin_turn() stack.begin_turn()
client = ScriptedClient() client = ScriptedClient()
agent = ChatAgent( agent = ChatAgent(
client, # type: ignore[arg-type] client,
model="m", model="m",
tools=_todo_registry(stack), tools=_todo_registry(stack),
stream=False, stream=False,
@@ -471,7 +471,7 @@ async def test_loop_none_nag_strategy_skips_inject() -> None:
stack.begin_turn() stack.begin_turn()
client = ScriptedClient() client = ScriptedClient()
agent = ChatAgent( agent = ChatAgent(
client, # type: ignore[arg-type] client,
model="m", model="m",
tools=_todo_registry(stack), tools=_todo_registry(stack),
stream=False, stream=False,
@@ -580,7 +580,7 @@ async def test_loop_synthetic_tool_refreshes_after_stack_cleared() -> None:
_ = stack.push("was dirty") _ = stack.push("was dirty")
client = CaptureClient() client = CaptureClient()
agent = ChatAgent( agent = ChatAgent(
client, # type: ignore[arg-type] client,
model="m", model="m",
tools=_todo_registry(stack), tools=_todo_registry(stack),
stream=False, stream=False,
+1 -1
View File
@@ -108,7 +108,7 @@ access_key_or_token = "sk"
async def empty() -> AsyncIterator[ChatCompletionChunk]: async def empty() -> AsyncIterator[ChatCompletionChunk]:
if False: if False:
yield # type: ignore[misc] yield
return return
return empty() return empty()
+1 -1
View File
@@ -90,7 +90,7 @@ def test_registration_source_context() -> None:
def test_tool_tags_reject_neither_surface() -> None: def test_tool_tags_reject_neither_surface() -> None:
try: try:
@tool(tags=ToolTag.YOLO, register=False) # type: ignore[arg-type] @tool(tags=ToolTag.YOLO, register=False)
async def bad() -> str: async def bad() -> str:
return "x" return "x"