refactor: replace type ignores with inline fallbacks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
0xallam
2026-01-10 14:19:19 -08:00
committed by Ahmed Allam
parent b80bb165b9
commit 498032e279
5 changed files with 7 additions and 7 deletions

View File

@@ -212,7 +212,7 @@ async def warm_up_llm() -> None:
{"role": "user", "content": "Reply with just 'OK'."}, {"role": "user", "content": "Reply with just 'OK'."},
] ]
llm_timeout = int(Config.get("llm_timeout")) # type: ignore[arg-type] llm_timeout = int(Config.get("llm_timeout") or "300")
completion_kwargs: dict[str, Any] = { completion_kwargs: dict[str, Any] = {
"model": model_name, "model": model_name,

View File

@@ -18,6 +18,6 @@ class LLMConfig:
self.enable_prompt_caching = enable_prompt_caching self.enable_prompt_caching = enable_prompt_caching
self.skills = skills or [] self.skills = skills or []
self.timeout = timeout or int(Config.get("llm_timeout")) # type: ignore[arg-type] self.timeout = timeout or int(Config.get("llm_timeout") or "300")
self.scan_mode = scan_mode if scan_mode in ["quick", "standard", "deep"] else "deep" self.scan_mode = scan_mode if scan_mode in ["quick", "standard", "deep"] else "deep"

View File

@@ -12,8 +12,8 @@ from strix.config import Config
class LLMRequestQueue: class LLMRequestQueue:
def __init__(self, max_concurrent: int = 1, delay_between_requests: float = 4.0): def __init__(self, max_concurrent: int = 1, delay_between_requests: float = 4.0):
delay_between_requests = float(Config.get("llm_rate_limit_delay")) # type: ignore[arg-type] delay_between_requests = float(Config.get("llm_rate_limit_delay") or "4.0")
max_concurrent = int(Config.get("llm_rate_limit_concurrent")) # type: ignore[arg-type] max_concurrent = int(Config.get("llm_rate_limit_concurrent") or "1")
self.max_concurrent = max_concurrent self.max_concurrent = max_concurrent
self.delay_between_requests = delay_between_requests self.delay_between_requests = delay_between_requests

View File

@@ -122,7 +122,7 @@ class DockerRuntime(AbstractRuntime):
for attempt in range(max_retries): for attempt in range(max_retries):
try: try:
self._verify_image_available(Config.get("strix_image")) # type: ignore[arg-type] self._verify_image_available(Config.get("strix_image") or "")
try: try:
existing_container = self.client.containers.get(container_name) existing_container = self.client.containers.get(container_name)

View File

@@ -19,8 +19,8 @@ from .registry import (
) )
SANDBOX_EXECUTION_TIMEOUT = float(Config.get("strix_sandbox_execution_timeout")) # type: ignore[arg-type] SANDBOX_EXECUTION_TIMEOUT = float(Config.get("strix_sandbox_execution_timeout") or "500")
SANDBOX_CONNECT_TIMEOUT = float(Config.get("strix_sandbox_connect_timeout")) # type: ignore[arg-type] SANDBOX_CONNECT_TIMEOUT = float(Config.get("strix_sandbox_connect_timeout") or "10")
async def execute_tool(tool_name: str, agent_state: Any | None = None, **kwargs: Any) -> Any: async def execute_tool(tool_name: str, agent_state: Any | None = None, **kwargs: Any) -> Any: