ci/lint: per-file ignores for tests in ruff and basedpyright

Relax ANN/ARG/PLR/C901 and related rules under tests/**; silence noisy
basedpyright reports for test fakes and private helpers.
This commit is contained in:
2026-07-15 10:35:30 +08:00
parent c5745e0711
commit 5c13e06427
10 changed files with 58 additions and 25 deletions
+4 -4
View File
@@ -13,11 +13,11 @@ def test_agent_section_defaults(tmp_path: Path) -> None:
_ = path.write_text("", encoding="utf-8")
store = load(path)
assert store.agent_config.system_prompt == ""
assert store.agent_config.max_tool_result_chars == 32_000 # noqa: PLR2004
assert store.agent_config.max_tool_result_chars == 32_000
assert store.agent_config.parallel_tools is True
assert store.agent_config.confirm_destructive is True
assert store.agent_config.path_denylist == []
assert store.agent_config.max_context_chars == 200_000 # noqa: PLR2004
assert store.agent_config.max_context_chars == 200_000
def test_agent_section_parse(tmp_path: Path) -> None:
@@ -36,8 +36,8 @@ max_context_chars = 5000
)
store = load(path)
assert store.agent_config.system_prompt == "Be brief."
assert store.agent_config.max_tool_result_chars == 100 # noqa: PLR2004
assert store.agent_config.max_tool_result_chars == 100
assert store.agent_config.parallel_tools is False
assert store.agent_config.confirm_destructive is False
assert store.agent_config.path_denylist == ["/secrets/", ".ssh/"]
assert store.agent_config.max_context_chars == 5000 # noqa: PLR2004
assert store.agent_config.max_context_chars == 5000