chore(api): apply autofix manully

This commit is contained in:
QuantumGhost
2025-09-17 22:31:19 +08:00
parent 73d4bb596a
commit eefcd3ecc4
47 changed files with 241 additions and 268 deletions

View File

@ -3,7 +3,6 @@ import uuid
from json import dumps as json_dumps
from json import loads as json_loads
from json.decoder import JSONDecodeError
from typing import Optional
from flask import request
from requests import get
@ -169,9 +168,9 @@ class ApiBasedToolSchemaParser:
return bundles
@staticmethod
def _get_tool_parameter_type(parameter: dict) -> Optional[ToolParameter.ToolParameterType]:
def _get_tool_parameter_type(parameter: dict) -> ToolParameter.ToolParameterType | None:
parameter = parameter or {}
typ: Optional[str] = None
typ: str | None = None
if parameter.get("format") == "binary":
return ToolParameter.ToolParameterType.FILE