mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-14 00:04:08 +09:00
Format code with pre-commit
This commit is contained in:
@@ -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@"
|
||||
|
||||
@@ -32,6 +32,7 @@ import gettext
|
||||
|
||||
_ = gettext.gettext
|
||||
|
||||
|
||||
class WarehouseApplication(Adw.Application):
|
||||
"""The main application singleton class."""
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -4,6 +4,7 @@ import gettext
|
||||
|
||||
_ = gettext.gettext
|
||||
|
||||
|
||||
class FilterRow(Adw.ActionRow):
|
||||
__gtype_name__ = "FilterRow"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -13,6 +13,7 @@ import gettext
|
||||
|
||||
_ = gettext.gettext
|
||||
|
||||
|
||||
class LeftoverSnapshotRow(Adw.ActionRow):
|
||||
__gtype_name__ = "LeftoverSnapshotRow"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -6,6 +6,7 @@ import gettext
|
||||
|
||||
_ = gettext.gettext
|
||||
|
||||
|
||||
class TarWorker:
|
||||
def compress_thread(self, *args):
|
||||
try:
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user