refactor: type remaining bare dict annotations (#37422)

This commit is contained in:
y 2026-06-14 21:29:02 +08:00 committed by GitHub
parent 0ca39c96db
commit 06d9b01a8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View File

@ -81,7 +81,7 @@ class ChatAppConfigManager(BaseAppConfigManager):
return app_config
@classmethod
def config_validate(cls, tenant_id: str, config: dict) -> AppModelConfigDict:
def config_validate(cls, tenant_id: str, config: dict[str, Any]) -> AppModelConfigDict:
"""
Validate for chat app model config

View File

@ -68,7 +68,7 @@ class CompletionAppConfigManager(BaseAppConfigManager):
return app_config
@classmethod
def config_validate(cls, tenant_id: str, config: dict) -> AppModelConfigDict:
def config_validate(cls, tenant_id: str, config: dict[str, Any]) -> AppModelConfigDict:
"""
Validate for completion app model config

View File

@ -1,7 +1,8 @@
import logging
import time
import uuid
from collections.abc import Sequence
from collections.abc import Mapping, Sequence
from typing import Any
import httpx
from httpx import DigestAuth
@ -24,7 +25,7 @@ _tidb_http_client: httpx.Client = get_pooled_http_client(
class TidbService:
@staticmethod
def extract_qdrant_endpoint(cluster_response: dict) -> str | None:
def extract_qdrant_endpoint(cluster_response: Mapping[str, Any]) -> str | None:
"""Extract the qdrant endpoint URL from a Get Cluster API response.
Reads ``endpoints.public.host`` (e.g. ``gateway01.xx.tidbcloud.com``),