refactor: improve type coercion functions and enhance type hints across multiple files

This commit is contained in:
Abhimanyu Saharan
2026-02-09 17:43:42 +05:30
parent f5d592f61a
commit dddd1e9a7a
13 changed files with 217 additions and 64 deletions

View File

@@ -8,7 +8,7 @@ import re
from contextlib import suppress
from dataclasses import dataclass, field
from pathlib import Path
from typing import TYPE_CHECKING, Any, cast
from typing import TYPE_CHECKING, Any
from uuid import uuid4
from jinja2 import Environment, FileSystemLoader, StrictUndefined, select_autoescape
@@ -452,7 +452,7 @@ async def _gateway_agent_files_index(
continue
name = item.get("name")
if isinstance(name, str) and name:
index[name] = cast(dict[str, Any], item)
index[name] = dict(item)
return index
except OpenClawGatewayError:
pass