Skip to content

Commit 84221ce

Browse files
refactor: improve code formatting and readability
- Reformatted comments and docstrings in `screen_switch_tool.py` for better clarity. - Cleaned up import statements in `askui_controller.py` for improved organization and readability.
1 parent daa65ef commit 84221ce

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/askui/tools/askui/askui_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import Literal, Type
88

99
import grpc
10-
from google.protobuf.json_format import MessageToDict # type: ignore
10+
from google.protobuf.json_format import MessageToDict
1111
from PIL import Image
1212
from pydantic import BaseModel, Field, model_validator
1313
from pydantic_settings import BaseSettings, SettingsConfigDict

src/askui/tools/screen_switch_tool.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ class ScreenSwitchTool(Tool):
88
"""
99

1010
def __init__(self, agent_os: AgentOs) -> None:
11-
# We need to determine the number of displays available to provide context to the agent
12-
# indicating that screen switching can only be done this number of times.
11+
# We need to determine the number of displays available to provide context
12+
# to the agent indicating that screen switching can only be done this number
13+
# of times.
1314
displays: list[DisplayInformation] = agent_os.get_display_information().displays
1415

1516
super().__init__(
1617
name="screen_switch",
1718
description=f"""
18-
This tool is useful for switching between multiple displays to find information not present on the current active screen.
19+
This tool is useful for switching between multiple displays to find
20+
information not present on the current active screen.
1921
If more than one display is available, this tool cycles through them.
2022
Number of displays available: {len(displays)}.
2123
""",
@@ -26,7 +28,8 @@ def __init__(self, agent_os: AgentOs) -> None:
2628
def __call__(self) -> None:
2729
"""
2830
Cycles to the next display if there are multiple displays.
29-
This tool is useful to switch between multiple displays if some information is not found on the current display.
31+
This tool is useful to switch between multiple displays if some information is
32+
not found on the current display.
3033
"""
3134
if len(self._displays) <= 1:
3235
return

0 commit comments

Comments
 (0)