Skip to content

Commit

Permalink
ignoring type errors on return value of derived class call function
Browse files Browse the repository at this point in the history
  • Loading branch information
shankar-vision-eng committed May 23, 2024
1 parent 2afce10 commit a6da425
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vision_agent/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def __call__(
self,
input: Union[List[Dict[str, str]], str],
image: Optional[Union[str, Path]] = None,
) -> Union[str, Dict[str, Any]]:
) -> str:
pass

@abstractmethod
Expand Down
2 changes: 1 addition & 1 deletion vision_agent/agent/vision_agent_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def build_working_memory(working_memory: Mapping[str, List[str]]) -> Sim:
for key, value in working_memory.items():
data["desc"].append(key)
data["doc"].append("\n".join(value))
df = pd.DataFrame(data) # type: ignore
df = pd.DataFrame(data)
return Sim(df, sim_key="desc")


Expand Down
4 changes: 2 additions & 2 deletions vision_agent/agent/vision_agent_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,12 @@ def __call__(
self,
input: Union[List[Dict[str, str]], str],
image: Optional[Union[str, Path]] = None,
) -> Dict[str, Any]:
) -> Dict[str, Any]: # type: ignore
if isinstance(input, str):
input = [{"role": "user", "content": input}]
results = self.chat_with_workflow(input, image)
results.pop("working_memory")
return results
return results # type: ignore

def chat_with_workflow(
self,
Expand Down

0 comments on commit a6da425

Please sign in to comment.