From e95fc9667a290e35bd039235a8affe6c1e5a1173 Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Sun, 8 Sep 2024 19:07:16 -0700 Subject: [PATCH] fixed type errors --- vision_agent/agent/agent_utils.py | 4 ++-- vision_agent/agent/vision_agent_coder.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vision_agent/agent/agent_utils.py b/vision_agent/agent/agent_utils.py index 06fa79a4..2a193a4a 100644 --- a/vision_agent/agent/agent_utils.py +++ b/vision_agent/agent/agent_utils.py @@ -43,7 +43,7 @@ def extract_json(json_str: str) -> Dict[str, Any]: json_str = json_str.replace("\n", " ").strip() try: - return json.loads(json_str) + return json.loads(json_str) # type: ignore except json.JSONDecodeError: json_orig = json_str json_str = _strip_markdown_code(json_str) @@ -55,7 +55,7 @@ def extract_json(json_str: str) -> Dict[str, Any]: _LOGGER.exception(error_msg) raise ValueError(error_msg) - return json_dict # type: ignore + return json_dict def extract_code(code: str) -> str: diff --git a/vision_agent/agent/vision_agent_coder.py b/vision_agent/agent/vision_agent_coder.py index ce95864d..3c11c730 100644 --- a/vision_agent/agent/vision_agent_coder.py +++ b/vision_agent/agent/vision_agent_coder.py @@ -459,7 +459,7 @@ def debug_code( try: # LLMs write worse code when it's in JSON, so we have it write JSON # followed by code each wrapped in markdown blocks. - fixed_code_and_test_str = debugger( # type: ignore + fixed_code_and_test_str = debugger( FIX_BUG.format( code=code, tests=test,