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@
|
#!@PYTHON@
|
||||||
# SPDX-License-Identifier: GPL-3.0-only
|
# SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
DEVEL = '@DEVEL@' == 'Development'
|
DEVEL = "@DEVEL@" == "Development"
|
||||||
PROFILE = '@DEVEL@'
|
PROFILE = "@DEVEL@"
|
||||||
APP_ID = '@APPID@'
|
APP_ID = "@APPID@"
|
||||||
VERSION = '@VERSION@'
|
VERSION = "@VERSION@"
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
class WarehouseApplication(Adw.Application):
|
class WarehouseApplication(Adw.Application):
|
||||||
"""The main application singleton class."""
|
"""The main application singleton class."""
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/main_window/window.ui")
|
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/main_window/window.ui")
|
||||||
class WarehouseWindow(Adw.ApplicationWindow):
|
class WarehouseWindow(Adw.ApplicationWindow):
|
||||||
__gtype_name__ = "WarehouseWindow"
|
__gtype_name__ = "WarehouseWindow"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
class FilterRow(Adw.ActionRow):
|
class FilterRow(Adw.ActionRow):
|
||||||
__gtype_name__ = "FilterRow"
|
__gtype_name__ = "FilterRow"
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/packages_page/packages_page.ui")
|
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/packages_page/packages_page.ui")
|
||||||
class PackagesPage(Adw.BreakpointBin):
|
class PackagesPage(Adw.BreakpointBin):
|
||||||
__gtype_name__ = "PackagesPage"
|
__gtype_name__ = "PackagesPage"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/packages_page/uninstall_dialog.ui")
|
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/packages_page/uninstall_dialog.ui")
|
||||||
class UninstallDialog(Adw.AlertDialog):
|
class UninstallDialog(Adw.AlertDialog):
|
||||||
__gtype_name__ = "UninstallDialog"
|
__gtype_name__ = "UninstallDialog"
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/properties_page/properties_page.ui")
|
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/properties_page/properties_page.ui")
|
||||||
class PropertiesPage(Adw.NavigationPage):
|
class PropertiesPage(Adw.NavigationPage):
|
||||||
__gtype_name__ = "PropertiesPage"
|
__gtype_name__ = "PropertiesPage"
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/new_snapshot_dialog.ui")
|
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/new_snapshot_dialog.ui")
|
||||||
class NewSnapshotDialog(Adw.Dialog):
|
class NewSnapshotDialog(Adw.Dialog):
|
||||||
__gtype_name__ = "NewSnapshotDialog"
|
__gtype_name__ = "NewSnapshotDialog"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/snapshot_box.ui")
|
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/snapshot_box.ui")
|
||||||
class SnapshotBox(Gtk.Box):
|
class SnapshotBox(Gtk.Box):
|
||||||
__gtype_name__ = "SnapshotBox"
|
__gtype_name__ = "SnapshotBox"
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
class LeftoverSnapshotRow(Adw.ActionRow):
|
class LeftoverSnapshotRow(Adw.ActionRow):
|
||||||
__gtype_name__ = "LeftoverSnapshotRow"
|
__gtype_name__ = "LeftoverSnapshotRow"
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/snapshots_list_page.ui")
|
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/snapshots_list_page.ui")
|
||||||
class SnapshotsListPage(Adw.NavigationPage):
|
class SnapshotsListPage(Adw.NavigationPage):
|
||||||
__gtype_name__ = "SnapshotsListPage"
|
__gtype_name__ = "SnapshotsListPage"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
class TarWorker:
|
class TarWorker:
|
||||||
def compress_thread(self, *args):
|
def compress_thread(self, *args):
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/user_data_page/data_box.ui")
|
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/user_data_page/data_box.ui")
|
||||||
class DataBox(Gtk.ListBox):
|
class DataBox(Gtk.ListBox):
|
||||||
__gtype_name__ = "DataBox"
|
__gtype_name__ = "DataBox"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import gettext
|
|||||||
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/user_data_page/data_subpage.ui")
|
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/user_data_page/data_subpage.ui")
|
||||||
class DataSubpage(Gtk.Stack):
|
class DataSubpage(Gtk.Stack):
|
||||||
__gtype_name__ = "DataSubpage"
|
__gtype_name__ = "DataSubpage"
|
||||||
|
|||||||
@@ -25,22 +25,24 @@ import signal
|
|||||||
import locale
|
import locale
|
||||||
import gettext
|
import gettext
|
||||||
|
|
||||||
VERSION = '@VERSION@'
|
VERSION = "@VERSION@"
|
||||||
pkgdatadir = '@pkgdatadir@'
|
pkgdatadir = "@pkgdatadir@"
|
||||||
localedir = '@localedir@'
|
localedir = "@localedir@"
|
||||||
|
|
||||||
sys.path.insert(1, pkgdatadir)
|
sys.path.insert(1, pkgdatadir)
|
||||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||||
locale.bindtextdomain('warehouse', localedir)
|
locale.bindtextdomain("warehouse", localedir)
|
||||||
locale.textdomain('warehouse')
|
locale.textdomain("warehouse")
|
||||||
gettext.install('warehouse', localedir)
|
gettext.install("warehouse", localedir)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
from gi.repository import Gio
|
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()
|
resource._register()
|
||||||
|
|
||||||
from src import main
|
from src import main
|
||||||
|
|
||||||
sys.exit(main.main(VERSION))
|
sys.exit(main.main(VERSION))
|
||||||
|
|||||||
Reference in New Issue
Block a user