Skip to content

Commit

Permalink
fixed type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Sep 9, 2024
1 parent abb3ff9 commit e95fc96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions vision_agent/agent/agent_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion vision_agent/agent/vision_agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e95fc96

Please sign in to comment.