Format code with pre-commit

This commit is contained in:
heliguy
2025-01-05 22:26:02 -05:00
parent 2600ada452
commit d650e20636
15 changed files with 28 additions and 12 deletions

View File

@@ -1,8 +1,9 @@
#!@PYTHON@
# SPDX-License-Identifier: GPL-3.0-only
class Config:
DEVEL = '@DEVEL@' == 'Development'
PROFILE = '@DEVEL@'
APP_ID = '@APPID@'
VERSION = '@VERSION@'
DEVEL = "@DEVEL@" == "Development"
PROFILE = "@DEVEL@"
APP_ID = "@APPID@"
VERSION = "@VERSION@"

View File

@@ -32,6 +32,7 @@ import gettext
_ = gettext.gettext
class WarehouseApplication(Adw.Application):
"""The main application singleton class."""

View File

@@ -29,6 +29,7 @@ import gettext
_ = gettext.gettext
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/main_window/window.ui")
class WarehouseWindow(Adw.ApplicationWindow):
__gtype_name__ = "WarehouseWindow"

View File

@@ -4,6 +4,7 @@ import gettext
_ = gettext.gettext
class FilterRow(Adw.ActionRow):
__gtype_name__ = "FilterRow"

View File

@@ -14,6 +14,7 @@ import gettext
_ = gettext.gettext
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/packages_page/packages_page.ui")
class PackagesPage(Adw.BreakpointBin):
__gtype_name__ = "PackagesPage"

View File

@@ -3,6 +3,7 @@ import gettext
_ = gettext.gettext
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/packages_page/uninstall_dialog.ui")
class UninstallDialog(Adw.AlertDialog):
__gtype_name__ = "UninstallDialog"

View File

@@ -10,6 +10,7 @@ import gettext
_ = gettext.gettext
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/properties_page/properties_page.ui")
class PropertiesPage(Adw.NavigationPage):
__gtype_name__ = "PropertiesPage"

View File

@@ -8,6 +8,7 @@ import gettext
_ = gettext.gettext
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/new_snapshot_dialog.ui")
class NewSnapshotDialog(Adw.Dialog):
__gtype_name__ = "NewSnapshotDialog"

View File

@@ -7,6 +7,7 @@ import gettext
_ = gettext.gettext
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/snapshot_box.ui")
class SnapshotBox(Gtk.Box):
__gtype_name__ = "SnapshotBox"

View File

@@ -13,6 +13,7 @@ import gettext
_ = gettext.gettext
class LeftoverSnapshotRow(Adw.ActionRow):
__gtype_name__ = "LeftoverSnapshotRow"

View File

@@ -9,6 +9,7 @@ import gettext
_ = gettext.gettext
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/snapshots_list_page.ui")
class SnapshotsListPage(Adw.NavigationPage):
__gtype_name__ = "SnapshotsListPage"

View File

@@ -6,6 +6,7 @@ import gettext
_ = gettext.gettext
class TarWorker:
def compress_thread(self, *args):
try:

View File

@@ -7,6 +7,7 @@ import gettext
_ = gettext.gettext
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/user_data_page/data_box.ui")
class DataBox(Gtk.ListBox):
__gtype_name__ = "DataBox"

View File

@@ -6,6 +6,7 @@ import gettext
_ = gettext.gettext
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/user_data_page/data_subpage.ui")
class DataSubpage(Gtk.Stack):
__gtype_name__ = "DataSubpage"

View File

@@ -25,22 +25,24 @@ import signal
import locale
import gettext
VERSION = '@VERSION@'
pkgdatadir = '@pkgdatadir@'
localedir = '@localedir@'
VERSION = "@VERSION@"
pkgdatadir = "@pkgdatadir@"
localedir = "@localedir@"
sys.path.insert(1, pkgdatadir)
signal.signal(signal.SIGINT, signal.SIG_DFL)
locale.bindtextdomain('warehouse', localedir)
locale.textdomain('warehouse')
gettext.install('warehouse', localedir)
locale.bindtextdomain("warehouse", localedir)
locale.textdomain("warehouse")
gettext.install("warehouse", localedir)
if __name__ == '__main__':
if __name__ == "__main__":
import gi
from gi.repository import Gio
resource = Gio.Resource.load(os.path.join(pkgdatadir, 'warehouse.gresource'))
resource = Gio.Resource.load(os.path.join(pkgdatadir, "warehouse.gresource"))
resource._register()
from src import main
sys.exit(main.main(VERSION))