mirror of
https://github.com/NCBM/plyngent.git
synced 2026-07-23 05:55:16 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user