Skip to content

Commit 13baebd

Browse files
author
zhansheng.lzs
committed
test: silence pylint on the two new cli/acli test modules
pytest fixtures are injected by name, so every test taking key_store or bundled_skills redefines it from module scope, and the ones that need only the fixture's side effects never read the parameter. Both are the repo's existing convention for test modules; the assertions are unchanged apart from `calls == []` becoming `not calls`. pre-commit run --all-files only started reporting these once the files were tracked — it lints tracked files, so the untracked originals were skipped.
1 parent 6545692 commit 13baebd

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎tests/unit/test_acli_skill_render.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
arrive, and every other brace comes back byte-identical.
2020
"""
2121

22-
# pylint: disable=protected-access
22+
# pylint: disable=protected-access,redefined-outer-name
2323

2424
from __future__ import annotations
2525

‎tests/unit/test_cli_auth.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
writes. Every test runs against a throwaway ``~/.dashscope`` and a stubbed
88
``Models.list``, so no real key file is touched and no request is sent.
99
"""
10+
11+
# pylint: disable=redefined-outer-name,unused-argument
12+
1013
from http import HTTPStatus
1114
from types import SimpleNamespace
1215

@@ -99,7 +102,7 @@ def test_no_key_prints_login_guidance(self, monkeypatch, key_store):
99102
"DASHSCOPE_API_KEY to configure one."
100103
)
101104
assert guidance in text
102-
assert calls == [], "must not reach the API without a key"
105+
assert not calls, "must not reach the API without a key"
103106

104107
def test_masks_key_and_reports_the_file_source(
105108
self,

0 commit comments

Comments
 (0)