fix: mypy issues

This commit is contained in:
Yeuoly
2025-01-09 16:53:30 +08:00
parent 76e24d91c0
commit f748d6c7c4
49 changed files with 157 additions and 133 deletions

View File

@ -109,11 +109,11 @@ class BuiltinToolProviderController(ToolProviderController):
"""
return self._get_builtin_tools()
def get_tool(self, tool_name: str) -> BuiltinTool | None:
def get_tool(self, tool_name: str) -> BuiltinTool | None: # type: ignore
"""
returns the tool that the provider can provide
"""
return next(filter(lambda x: x.entity.identity.name == tool_name, self.get_tools()), None)
return next(filter(lambda x: x.entity.identity.name == tool_name, self.get_tools()), None) # type: ignore
@property
def need_credentials(self) -> bool: