From 872ad27b97c69587c2953d749f0974688d20da39 Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Fri, 12 Apr 2024 14:37:11 -0700 Subject: [PATCH] fixed mypy errors --- vision_agent/agent/vision_agent.py | 2 +- vision_agent/tools/tools.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vision_agent/agent/vision_agent.py b/vision_agent/agent/vision_agent.py index e6c34fdb..2f1d58b4 100644 --- a/vision_agent/agent/vision_agent.py +++ b/vision_agent/agent/vision_agent.py @@ -482,7 +482,7 @@ def chat_with_workflow( if visualize_output: visualized_output = all_tool_results[-1]["visualized_output"] for image in visualized_output: - Image.open(image).show() # type: ignore + Image.open(image).show() return final_answer, all_tool_results diff --git a/vision_agent/tools/tools.py b/vision_agent/tools/tools.py index 9b1a6740..12450753 100644 --- a/vision_agent/tools/tools.py +++ b/vision_agent/tools/tools.py @@ -622,7 +622,7 @@ class Calculator(Tool): } def __call__(self, equation: str) -> float: - return round(eval(equation), 2) + return cast(float, round(eval(equation), 2)) TOOLS = {