fix: 修复 pre-commit hook 基于pyright 配置
This commit is contained in:
@@ -7,6 +7,7 @@ from ag_ui.core.types import RunAgentInput
|
||||
from agentscope.message import Msg
|
||||
from openai import APIConnectionError
|
||||
from core.agentscope.runtime.runner import AgentScopeRunner
|
||||
from core.agentscope.runtime.protocols import PipelineLike
|
||||
from core.logging import get_logger
|
||||
from schemas.agent.runtime_config import RuntimeConfig
|
||||
from schemas.shared.user import UserContext
|
||||
@@ -14,10 +15,6 @@ from schemas.shared.user import UserContext
|
||||
logger = get_logger("core.agentscope.runtime.orchestrator")
|
||||
|
||||
|
||||
class PipelineLike(Protocol):
|
||||
async def emit(self, *, session_id: str, event: dict[str, Any]) -> str: ...
|
||||
|
||||
|
||||
class RunnerLike(Protocol):
|
||||
async def execute(
|
||||
self,
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Protocol
|
||||
|
||||
|
||||
class PipelineLike(Protocol):
|
||||
async def emit(self, *, session_id: str, event: dict[str, Any]) -> str: ...
|
||||
@@ -4,7 +4,7 @@ import asyncio
|
||||
import contextlib
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime, timezone
|
||||
from typing import TYPE_CHECKING, Any, Awaitable, Callable
|
||||
from typing import Any, Awaitable, Callable
|
||||
|
||||
from ag_ui.core.types import RunAgentInput
|
||||
from agentscope.formatter import OpenAIChatFormatter
|
||||
@@ -48,8 +48,7 @@ from services.llm_pricing.service import LlmPricingService
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.agentscope.runtime.orchestrator import PipelineLike
|
||||
from core.agentscope.runtime.protocols import PipelineLike
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
||||
@@ -5,7 +5,6 @@ from typing import ClassVar, Literal
|
||||
from urllib.parse import quote
|
||||
|
||||
from pydantic import (
|
||||
AnyHttpUrl,
|
||||
BaseModel,
|
||||
Field,
|
||||
SecretStr,
|
||||
@@ -120,7 +119,7 @@ class RedisSettings(BaseModel):
|
||||
|
||||
|
||||
class SupabaseSettings(BaseModel):
|
||||
public_url: AnyHttpUrl
|
||||
public_url: str
|
||||
anon_key: str = "CHANGE_ME"
|
||||
service_role_key: str = "CHANGE_ME"
|
||||
jwt_secret: SecretStr | None = Field(default=None, exclude=True)
|
||||
|
||||
Reference in New Issue
Block a user