diff --git a/cartridges/application.py b/cartridges/application.py index 2a2558e..4689737 100644 --- a/cartridges/application.py +++ b/cartridges/application.py @@ -13,7 +13,7 @@ from .ui.window import Window class Application(Adw.Application): """The main application.""" - def __init__(self) -> None: + def __init__(self): super().__init__(application_id=APP_ID) self.add_action_entries(( @@ -23,11 +23,11 @@ class Application(Adw.Application): self.set_accels_for_action("app.quit", ("q",)) @override - def do_activate(self) -> None: + def do_activate(self): window = self.props.active_window or Window(application=self) window.present() - def _present_about_dialog(self) -> None: + def _present_about_dialog(self): dialog = Adw.AboutDialog.new_from_appdata(f"{PREFIX}/{APP_ID}.metainfo.xml") # Translators: Replace "translator-credits" with your name/username, # and optionally a URL or an email in format. diff --git a/cartridges/ui/window.py b/cartridges/ui/window.py index f89f70d..1058c4e 100644 --- a/cartridges/ui/window.py +++ b/cartridges/ui/window.py @@ -42,7 +42,7 @@ class Window(Adw.ApplicationWindow): """Model of the user's games.""" return games.model - def __init__(self, **kwargs: Any) -> None: + def __init__(self, **kwargs: Any): super().__init__(**kwargs) if PROFILE == "development": @@ -59,20 +59,20 @@ class Window(Adw.ApplicationWindow): )) @Gtk.Template.Callback() - def _search_started(self, entry: Gtk.SearchEntry) -> None: + def _search_started(self, entry: Gtk.SearchEntry): entry.grab_focus() @Gtk.Template.Callback() - def _search_changed(self, entry: Gtk.SearchEntry) -> None: + def _search_changed(self, entry: Gtk.SearchEntry): self.search_text = entry.props.text entry.grab_focus() @Gtk.Template.Callback() - def _stop_search(self, entry: Gtk.SearchEntry) -> None: + def _stop_search(self, entry: Gtk.SearchEntry): entry.props.text = "" self.grid.grab_focus() - def _sort(self, action: Gio.SimpleAction, parameter: GLib.Variant, *_args) -> None: + def _sort(self, action: Gio.SimpleAction, parameter: GLib.Variant, *_args): action.change_state(parameter) prop, invert = SORT_MODES[parameter.get_string()] opposite = (self._sort_prop == prop) and (self._invert_sort != invert)