chore: apply ruff's pyupgrade linter rules to modernize Python code with targeted version (#2419)
This commit is contained in:
parent
589099a005
commit
063191889d
246 changed files with 912 additions and 937 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import json
|
||||
from typing import List
|
||||
|
||||
from flask import current_app
|
||||
from httpx import get
|
||||
|
|
@ -103,7 +102,7 @@ class ToolManageService:
|
|||
]
|
||||
|
||||
@staticmethod
|
||||
def parser_api_schema(schema: str) -> List[ApiBasedToolBundle]:
|
||||
def parser_api_schema(schema: str) -> list[ApiBasedToolBundle]:
|
||||
"""
|
||||
parse api schema to tool bundle
|
||||
"""
|
||||
|
|
@ -173,7 +172,7 @@ class ToolManageService:
|
|||
raise ValueError(f'invalid schema: {str(e)}')
|
||||
|
||||
@staticmethod
|
||||
def convert_schema_to_tool_bundles(schema: str, extra_info: dict = None) -> List[ApiBasedToolBundle]:
|
||||
def convert_schema_to_tool_bundles(schema: str, extra_info: dict = None) -> list[ApiBasedToolBundle]:
|
||||
"""
|
||||
convert schema to tool bundles
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue