flake8 fixes
This commit is contained in:
parent
3e44e28707
commit
a27fbe96dd
|
@ -52,11 +52,11 @@ install_subdir('tuhi',
|
|||
# use the normal dirs.
|
||||
#
|
||||
config_tuhi = configuration_data()
|
||||
config_tuhi.set_quoted('libexecdir', libexecdir)
|
||||
config_tuhi.set('libexecdir', libexecdir)
|
||||
config_tuhi.set('devel', '')
|
||||
|
||||
config_tuhi_devel = configuration_data()
|
||||
config_tuhi_devel.set_quoted('libexecdir', '')
|
||||
config_tuhi_devel.set('libexecdir', '')
|
||||
config_tuhi_devel.set('devel', '''
|
||||
tuhi_gui = '@1@/tuhi-gui.devel'
|
||||
tuhi_server = '@0@/tuhi-server.py'
|
||||
|
|
12
tuhi-gui.in
12
tuhi-gui.in
|
@ -4,16 +4,19 @@ import gi
|
|||
import sys
|
||||
import os
|
||||
|
||||
gi.require_version('Gio', '2.0')
|
||||
gi.require_version("Gtk", "3.0")
|
||||
gi.require_version('Gio', '2.0') # NOQA
|
||||
gi.require_version('Gtk', '3.0') # NOQA
|
||||
from gi.repository import Gio, Gtk, Gdk
|
||||
|
||||
@devel@
|
||||
|
||||
@devel@ # NOQA
|
||||
resource = Gio.resource_load(os.path.join('@pkgdatadir@', 'tuhi.gresource'))
|
||||
Gio.Resource._register(resource)
|
||||
|
||||
|
||||
def install_excepthook():
|
||||
old_hook = sys.excepthook
|
||||
|
||||
def new_hook(etype, evalue, etb):
|
||||
old_hook(etype, evalue, etb)
|
||||
while Gtk.main_level():
|
||||
|
@ -21,6 +24,7 @@ def install_excepthook():
|
|||
sys.exit()
|
||||
sys.excepthook = new_hook
|
||||
|
||||
|
||||
def gtk_style():
|
||||
css = b"""
|
||||
flowboxchild:selected {
|
||||
|
@ -51,6 +55,7 @@ def gtk_style():
|
|||
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import gettext
|
||||
import locale
|
||||
|
@ -67,4 +72,3 @@ if __name__ == "__main__":
|
|||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
exit_status = Application().run(sys.argv)
|
||||
sys.exit(exit_status)
|
||||
|
||||
|
|
6
tuhi.in
6
tuhi.in
|
@ -14,11 +14,11 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
tuhi_server = os.path.join(@libexecdir@, 'tuhi-server')
|
||||
tuhi_gui = os.path.join(@libexecdir@, 'tuhi-gui')
|
||||
tuhi_server = os.path.join('@libexecdir@', 'tuhi-server')
|
||||
tuhi_gui = os.path.join('@libexecdir@', 'tuhi-gui')
|
||||
|
||||
@devel@
|
||||
|
||||
@devel@ # NOQA
|
||||
|
||||
if __name__ == '__main__':
|
||||
tuhi = subprocess.Popen(tuhi_server)
|
||||
|
|
Loading…
Reference in New Issue