Skip to content

Commit ce72b41

Browse files
Fix: Formatting ang Darglint
1 parent bf57591 commit ce72b41

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/agentlab/agents/agent_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
from logging import warning
33

44

5-
65
"""
76
This module contains utility functions for handling observations and actions in the context of agent interactions.
87
"""
98

9+
1010
def tag_screenshot_with_action(screenshot: Image, action: str) -> Image:
1111
"""
1212
If action is a coordinate action, try to render it on the screenshot.

src/agentlab/analyze/agent_xray.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,9 @@ def wrapper(*args, **kwargs):
535535
def update_screenshot(som_or_not: str):
536536
global info
537537
action = info.exp_result.steps_info[info.step].action
538-
return agent_utils.tag_screenshot_with_action(get_screenshot(info, som_or_not=som_or_not), action)
538+
return agent_utils.tag_screenshot_with_action(
539+
get_screenshot(info, som_or_not=som_or_not), action
540+
)
539541

540542

541543
def get_screenshot(info: Info, step: int = None, som_or_not: str = "Raw Screenshots"):
@@ -554,7 +556,9 @@ def update_screenshot_pair(som_or_not: str):
554556
s2 = get_screenshot(info, info.step + 1, som_or_not)
555557

556558
if s1 is not None:
557-
s1 = agent_utils.tag_screenshot_with_action(s1, info.exp_result.steps_info[info.step].action)
559+
s1 = agent_utils.tag_screenshot_with_action(
560+
s1, info.exp_result.steps_info[info.step].action
561+
)
558562
return s1, s2
559563

560564

@@ -596,7 +600,12 @@ def dict_to_markdown(d: dict):
596600
"""
597601
Convert a dictionary to a clean markdown representation, recursively.
598602
599-
dict: type = dict[str, str | list[dict[...]]]
603+
Args:
604+
d (dict): A dictionary where keys are strings and values can be strings,
605+
lists of dictionaries, or nested dictionaries.
606+
607+
Returns:
608+
str: A markdown-formatted string representation of the dictionary.
600609
"""
601610
if not isinstance(d, dict):
602611
warning(f"Expected dict, got {type(d)}")

0 commit comments

Comments
 (0)