chore: apply ruff's pyupgrade linter rules to modernize Python code with targeted version (#2419)

This commit is contained in:
Bowen Liang 2024-02-09 15:21:33 +08:00 • committed by GitHub
commit 063191889d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
246 changed files with 912 additions and 937 deletions

View file

@ -1,5 +1,5 @@
from datetime import datetime
from typing import Any, Dict, List, Union
from typing import Any, Union
from googleapiclient.discovery import build
@ -8,8 +8,8 @@ from core.tools.tool.builtin_tool import BuiltinTool
class YoutubeVideosAnalyticsTool(BuiltinTool):
def _invoke(self, user_id: str, tool_parameters: Dict[str, Any]) \
-> Union[ToolInvokeMessage, List[ToolInvokeMessage]]:
def _invoke(self, user_id: str, tool_parameters: dict[str, Any]) \
-> Union[ToolInvokeMessage, list[ToolInvokeMessage]]:
"""
invoke tools
"""