style: auto-format enhance_skill_local.py and test with ruff
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1214,9 +1214,7 @@ def _detect_api_target() -> tuple[str, str] | None:
|
|||||||
Returns:
|
Returns:
|
||||||
(target, api_key) tuple if an API key is found, else None.
|
(target, api_key) tuple if an API key is found, else None.
|
||||||
"""
|
"""
|
||||||
anthropic_key = os.environ.get("ANTHROPIC_API_KEY") or os.environ.get(
|
anthropic_key = os.environ.get("ANTHROPIC_API_KEY") or os.environ.get("ANTHROPIC_AUTH_TOKEN")
|
||||||
"ANTHROPIC_AUTH_TOKEN"
|
|
||||||
)
|
|
||||||
if anthropic_key:
|
if anthropic_key:
|
||||||
return ("claude", anthropic_key)
|
return ("claude", anthropic_key)
|
||||||
|
|
||||||
|
|||||||
@@ -683,9 +683,7 @@ class TestEnhanceDispatcher:
|
|||||||
called_with["target"] = target
|
called_with["target"] = target
|
||||||
called_with["api_key"] = api_key
|
called_with["api_key"] = api_key
|
||||||
|
|
||||||
monkeypatch.setattr(
|
monkeypatch.setattr("skill_seekers.cli.enhance_skill_local._run_api_enhance", fake_run_api)
|
||||||
"skill_seekers.cli.enhance_skill_local._run_api_enhance", fake_run_api
|
|
||||||
)
|
|
||||||
main()
|
main()
|
||||||
assert called_with == {"target": "gemini", "api_key": "AIza-test"}
|
assert called_with == {"target": "gemini", "api_key": "AIza-test"}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user