From d6ef55a3b3ebf53b5ef8d860038a304b40176576 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 29 Apr 2026 01:04:22 +0900 Subject: [PATCH] chore: explicitly return False instead of GLib macro --- dzgui/config/query.py | 6 ++++-- dzgui/views/components/right_panel.py | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dzgui/config/query.py b/dzgui/config/query.py index 50f3c34..00bb522 100644 --- a/dzgui/config/query.py +++ b/dzgui/config/query.py @@ -54,7 +54,9 @@ def enum_to_key(enum: Preferences) -> str: def get_client_index(client: str) -> int: if client == STEAM_CMD: return 0 - if client == FLATPAK_RUN_CMD: + elif client == FLATPAK_RUN_CMD: return 1 - if client == FLATPAK_SANDBOX: + elif client == FLATPAK_SANDBOX: return 2 + else: + return 0 diff --git a/dzgui/views/components/right_panel.py b/dzgui/views/components/right_panel.py index 79c4379..f421369 100644 --- a/dzgui/views/components/right_panel.py +++ b/dzgui/views/components/right_panel.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING +from typing import Literal, TYPE_CHECKING from dzgui.const.enum import ServerTab from dzgui.util.clip import copy_clipboard @@ -72,10 +72,10 @@ class RightPanel(Gtk.Box): self.filters_vbox.set_sensitive(state) def _on_version_clicked(self, widget: Gtk.EventBox, event: Gdk.EventButton) -> None: - def revert() -> GLib.SOURCE_REMOVE: + def revert() -> Literal[False]: self.copying = False self.version_label.set_text(version) - return GLib.SOURCE_REMOVE + return False if self.copying: return