From 0c333aa64bee0bdf5222d9082d7ef9498fd0bde8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Aug 2019 14:41:26 +1000 Subject: [PATCH] gui: fix flake8 warnings Signed-off-by: Peter Hutterer --- tools/tuhi-gui-flatpak.py | 3 +++ tuhigui/drawingperspective.py | 4 +--- tuhigui/window.py | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/tuhi-gui-flatpak.py b/tools/tuhi-gui-flatpak.py index c4c386d..6bbdcd5 100755 --- a/tools/tuhi-gui-flatpak.py +++ b/tools/tuhi-gui-flatpak.py @@ -14,12 +14,15 @@ import subprocess from multiprocessing import Process + def start_tuhi(): subprocess.run('tuhi') + def start_tuhigui(): subprocess.run('tuhi-gui') + if __name__ == '__main__': tuhi = Process(target=start_tuhi) tuhi.daemon = True diff --git a/tuhigui/drawingperspective.py b/tuhigui/drawingperspective.py index 97390dd..0f4b219 100644 --- a/tuhigui/drawingperspective.py +++ b/tuhigui/drawingperspective.py @@ -11,7 +11,6 @@ # GNU General Public License for more details. # -from gettext import gettext as _ from gi.repository import GObject, Gtk from .drawing import Drawing from .config import Config @@ -108,8 +107,7 @@ class DrawingPerspective(Gtk.Stack): fb.insert(drawing) # Remove deleted drawings - deleted = [ts for ts in self.known_drawings if ts not in - [ js['timestamp'] for js in config.drawings]] + deleted = [ts for ts in self.known_drawings if ts not in [js['timestamp'] for js in config.drawings]] for ts in deleted: drawing = self.known_drawings[ts] fb = self.flowboxes[_hash(drawing)] diff --git a/tuhigui/window.py b/tuhigui/window.py index 61e3486..dc1e29f 100644 --- a/tuhigui/window.py +++ b/tuhigui/window.py @@ -179,7 +179,6 @@ class MainWindow(Gtk.ApplicationWindow): device.connect('notify::battery-state', self._on_battery_changed) self._on_battery_changed(device, None) - def _on_battery_changed(self, device, pspec): if device.battery_percent > 80: fill = 'full'