chore: ruff auto-fix C401, C416, C408, PLR1722 (#23940)

C401:   set(x for x in y) -> {x for x in y}      (set comprehension)
C416:   [(k,v) for k,v in d] -> list(d.items())  (unnecessary listcomp)
C408:   tuple()/dict() -> ()/{}                   (unnecessary collection call)
PLR1722: exit() -> sys.exit()                     (adds import sys where needed)

21 instances fixed, 0 remaining. 19 files, +40/-36.
This commit is contained in:
kshitij 2026-05-11 11:20:58 -07:00 committed by GitHub
parent 7b76366552
commit ce0f529cde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 40 additions and 36 deletions

View file

@ -54,6 +54,7 @@ from typing import Dict, Any, List, Optional
from tools.openrouter_client import get_async_client as _get_openrouter_client, check_api_key as check_openrouter_api_key
from agent.auxiliary_client import extract_content_or_reasoning
from tools.debug_helpers import DebugSession
import sys
logger = logging.getLogger(__name__)
@ -451,7 +452,7 @@ if __name__ == "__main__":
print("❌ OPENROUTER_API_KEY environment variable not set")
print("Please set your API key: export OPENROUTER_API_KEY='your-key-here'")
print("Get API key at: https://openrouter.ai/")
exit(1)
sys.exit(1)
else:
print("✅ OpenRouter API key found")