cartridges: Remove None return type annotations

This commit is contained in:
kramo
2025-11-30 12:04:26 +01:00
committed by Laura Kramolis
parent 724f047889
commit d627748b53
2 changed files with 8 additions and 8 deletions

View File

@@ -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", ("<Control>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 <user@example.org> format.

View File

@@ -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)