Reformat with ruff format

This commit is contained in:
Philipp Hörist
2026-01-02 17:30:56 +01:00
parent fd70805de6
commit aed2ce4729
27 changed files with 15 additions and 73 deletions

View File

@@ -79,7 +79,6 @@ class ConfigBuilder(Gtk.Builder):
class ConfigDialog(GajimAppWindow):
def __init__(self, plugin: Triggers, transient: Gtk.Window) -> None:
GajimAppWindow.__init__(
self,
name="TriggersConfigDialog",
@@ -467,7 +466,6 @@ class ConfigDialog(GajimAppWindow):
self._set_treeview_string()
def _on_recipient_type_combobox_changed(self, widget: Gtk.ComboBox) -> None:
if self._active_num < 0:
return
recipient_type = RECIPIENT_TYPES[widget.get_active()]
@@ -578,7 +576,6 @@ class ConfigDialog(GajimAppWindow):
def _on_use_it_toggled(
self, widget: Gtk.CheckButton, opposite_widget: Gtk.CheckButton, option: str
) -> None:
if widget.get_active():
if opposite_widget.get_active():
opposite_widget.set_active(False)
@@ -591,7 +588,6 @@ class ConfigDialog(GajimAppWindow):
def _on_disable_it_toggled(
self, widget: Gtk.CheckButton, opposite_widget: Gtk.CheckButton, option: str
) -> None:
if widget.get_active():
if opposite_widget.get_active():
opposite_widget.set_active(False)

View File

@@ -103,7 +103,6 @@ class Triggers(GajimPlugin):
check_func: Callable[..., bool],
apply_func: Callable[..., Any],
) -> RuleResult:
result = RuleResult()
rules_num = [int(item) for item in self.config]
@@ -290,7 +289,6 @@ class Triggers(GajimPlugin):
def _excecute_notification_rules(
self, result: RuleResult, event: Notification
) -> bool:
if result.sound is False:
event.sound = None