Skip to content

Commit

Permalink
change res to resolution to make it clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhsuan committed Dec 3, 2024
1 parent f8423ea commit 020c0cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions checkbox-support/checkbox_support/dbus/gnome_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def set_extended_mode(self) -> Dict[str, str]:

def cycle(
self,
res: bool = True,
resolution: bool = True,
transform: bool = False,
resolution_filter: Callable[[List[Mode]], List[Mode]] = None,
action: Callable[..., Any] = None,
Expand All @@ -117,7 +117,7 @@ def cycle(
Automatically cycle through the supported monitor configurations.
Args:
res: Cycling the resolution or not.
resolution: Cycling the resolution or not.
transform: Cycling the transform or not.
Expand All @@ -136,7 +136,7 @@ def cycle(
# ["normal": 0, "left": 1, "inverted": 6, "right": 3]
trans_list = [0, 1, 6, 3] if transform else [0]

# for multiple monitors, we need to create res combination
# for multiple monitors, we need to create resolution combination
state = self._get_current_state()
for monitor, modes in state[1].items():
monitors.append(monitor)
Expand Down Expand Up @@ -178,7 +178,7 @@ def cycle(
self._apply_monitors_config(state[0], logical_monitors)
if action:
action(uni_string, **kwargs)
if not res:
if not resolution:
break
# change back to preferred monitor configuration
self.set_extended_mode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def test_cycle_no_cycling(self, mock_dbus_proxy):
# mock callback
mock_callback = MagicMock()
gnome_monitor.cycle(
res=False,
resolution=False,
transform=False,
resoultion_filter=mock_callback,
action=mock_callback,
Expand Down

0 comments on commit 020c0cc

Please sign in to comment.