refactor: remove unused signal parameters from event handlers
This commit is contained in:
8 files changed
+11
-11
No files matched your search
@@ -734,7 +734,7 @@ class PlayerBox(Box):
|
||||
self._seek_timeout = GLib.timeout_add(1000, self._clear_seeking)
|
||||
return False
|
||||
|
||||
def _on_change_value(self, scale, scroll, value):
|
||||
def _on_change_value(self, scale, _scroll, value):
|
||||
if not self.player or self.exit:
|
||||
return False
|
||||
self._user_seeking = True
|
||||
|
||||
@@ -511,7 +511,7 @@ class ModusControlCenter(AppletWindow):
|
||||
# Connect to visibility changes for cleanup
|
||||
self.connect("notify::visible", self._on_visibility_changed)
|
||||
|
||||
def _on_visibility_changed(self, widget, param):
|
||||
def _on_visibility_changed(self, widget, _param):
|
||||
"""Handle visibility changes for resource management"""
|
||||
if not self.get_visible():
|
||||
# Suspend player updates
|
||||
|
||||
@@ -506,7 +506,7 @@ class DockCanvas(Gtk.DrawingArea):
|
||||
self._needs_redraw = True
|
||||
self.queue_draw()
|
||||
|
||||
def _on_window_title_changed(self, hyprland, signal) -> None:
|
||||
def _on_window_title_changed(self, _hyprland, signal) -> None:
|
||||
try:
|
||||
address = signal.data[0]
|
||||
if not address:
|
||||
|
||||
@@ -22,7 +22,7 @@ class DockLayout:
|
||||
def compute(
|
||||
items: List[DockItem],
|
||||
mouse_x: float,
|
||||
mouse_y: float,
|
||||
_mouse_y: float,
|
||||
base_icon_size: int,
|
||||
canvas_w: int,
|
||||
canvas_h: int,
|
||||
|
||||
@@ -220,7 +220,7 @@ class CustomMods(Box):
|
||||
except Exception as e:
|
||||
logger.error(f"[CustomMods] Failed to setup monitor: {e}")
|
||||
|
||||
def _on_file_changed(self, monitor, gfile, other_file, event_type):
|
||||
def _on_file_changed(self, monitor, gfile, _other_file, event_type):
|
||||
if event_type == Gio.FileMonitorEvent.DELETED and gfile.get_path() == str(
|
||||
MODS_CONFIG_PATH
|
||||
):
|
||||
|
||||
@@ -35,7 +35,7 @@ def create_menu_button(label, on_clicked=None):
|
||||
return button
|
||||
|
||||
|
||||
def create_dropdown_with_capture(dropdown_id, parent, dropdown_children, layer="top"):
|
||||
def create_dropdown_with_capture(dropdown_id, parent, dropdown_children):
|
||||
dropdown = ModusDropdown(
|
||||
dropdown_id=dropdown_id,
|
||||
parent=parent,
|
||||
|
||||
@@ -116,7 +116,7 @@ class BluetoothIndicator(Box):
|
||||
|
||||
self.bt_button.set_tooltip_text(tooltip)
|
||||
|
||||
def on_bluetooth_changed(self, service, new_bluetooth_state):
|
||||
def on_bluetooth_changed(self, service, _new_bluetooth_state):
|
||||
self.update_state()
|
||||
|
||||
def on_bluetooth_direct_changed(self, *args):
|
||||
@@ -203,7 +203,7 @@ class NetworkIndicator(Box):
|
||||
self.update_modus_service_wlan_state()
|
||||
self.update_state()
|
||||
|
||||
def on_wlan_changed(self, service, new_wlan_state):
|
||||
def on_wlan_changed(self, service, _new_wlan_state):
|
||||
self.update_state()
|
||||
|
||||
def on_wifi_device_added(self, *args):
|
||||
@@ -358,7 +358,7 @@ class BatteryIndicator(Box):
|
||||
self.update_modus_service_battery_state()
|
||||
self.update_state()
|
||||
|
||||
def on_battery_changed(self, service, new_battery_state):
|
||||
def on_battery_changed(self, service, _new_battery_state):
|
||||
self.update_state()
|
||||
|
||||
def on_battery_direct_changed(self, *args):
|
||||
|
||||
@@ -165,7 +165,7 @@ class Notch(Box):
|
||||
|
||||
self._apply_stack_state()
|
||||
|
||||
def _on_new_player(self, manager, name: str, service):
|
||||
def _on_new_player(self, _manager, name: str, service):
|
||||
service.connect("artwork-change", self._on_any_artwork)
|
||||
if name not in self._music_services:
|
||||
self._music_services.append(name)
|
||||
@@ -184,7 +184,7 @@ class Notch(Box):
|
||||
def _on_any_artwork(self, service, local_path: str):
|
||||
self.player_widget._on_artwork_change(service, local_path)
|
||||
|
||||
def _on_player_vanish(self, manager, name: str):
|
||||
def _on_player_vanish(self, _manager, name: str):
|
||||
if name in self._music_services:
|
||||
self._music_services.remove(name)
|
||||
self._apply_stack_state()
|
||||
|
||||
Reference in new issue
Block a user