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