From 4b02a6f51cb28f01f84156262b125135d28c73c5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 5 Jun 2019 15:00:57 +1000 Subject: [PATCH] Fix flake8-3 complaints Signed-off-by: Peter Hutterer --- tuhi/base.py | 10 ++++------ tuhi/ble.py | 2 +- tuhi/wacom.py | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tuhi/base.py b/tuhi/base.py index d756ef4..c2ae531 100644 --- a/tuhi/base.py +++ b/tuhi/base.py @@ -348,10 +348,10 @@ class Tuhi(GObject.Object): # create the device if unknown from us if bluez_device.address not in self.devices: - d = TuhiDevice(bluez_device, self.config, uuid, mode) - d.dbus_device = self.server.create_device(d) - d.connect('notify::listening', self._on_listening_updated) - self.devices[bluez_device.address] = d + d = TuhiDevice(bluez_device, self.config, uuid, mode) + d.dbus_device = self.server.create_device(d) + d.connect('notify::listening', self._on_listening_updated) + self.devices[bluez_device.address] = d d = self.devices[bluez_device.address] @@ -399,5 +399,3 @@ def main(args=sys.argv): Tuhi().run() except KeyboardInterrupt: pass - finally: - pass diff --git a/tuhi/ble.py b/tuhi/ble.py index adee7b9..339dc26 100755 --- a/tuhi/ble.py +++ b/tuhi/ble.py @@ -229,7 +229,7 @@ class BlueZDevice(GObject.Object): result.code == Gio.IOErrorEnum.DBUS_ERROR and Gio.dbus_error_get_remote_error(result) == 'org.bluez.Error.Failed' and 'Operation already in progress' in result.message): - logger.debug(f'{self.address}: Already connecting') + logger.debug(f'{self.address}: Already connecting') elif isinstance(result, Exception): logger.error(f'Connection failed: {result}') diff --git a/tuhi/wacom.py b/tuhi/wacom.py index 086827a..9cc7ceb 100644 --- a/tuhi/wacom.py +++ b/tuhi/wacom.py @@ -910,7 +910,7 @@ class WacomProtocolSlate(WacomProtocolSpark): def live_mode(self, mode, uhid): # Slate tablet has two models A5 and A4 - # Here, we read real tablet dimensions before + # Here, we read real tablet dimensions before # starting live mode self.width = self.get_dimensions('width') self.height = self.get_dimensions('height')