ble: fix flake8 warnings

./tuhi/ble.py:14:1: F401 'sys' imported but unused
./tuhi/ble.py:15:1: F401 'enum.Enum' imported but unused
./tuhi/ble.py:16:1: F401 'gi.repository.GLib' imported but unused
./tuhi/ble.py:26:1: E302 expected 2 blank lines, found 1
./tuhi/ble.py:81:1: W293 blank line contains whitespace
./tuhi/ble.py:84:13: E126 continuation line over-indented for hanging indent
./tuhi/ble.py:85:17: E131 continuation line unaligned for hanging indent
./tuhi/ble.py:203:39: F821 undefined name 'WACOM_CHRC_LIVE_PEN_DATA_UUID'
./tuhi/ble.py:204:38: E128 continuation line under-indented for visual indent
./tuhi/ble.py:205:39: F821 undefined name 'WACOM_OFFLINE_CHRC_PEN_DATA_UUID'
./tuhi/ble.py:206:38: E128 continuation line under-indented for visual indent
./tuhi/ble.py:207:39: F821 undefined name 'NORDIC_UART_CHRC_RX_UUID'
./tuhi/ble.py:208:38: E128 continuation line under-indented for visual indent
./tuhi/ble.py:232:1: E302 expected 2 blank lines, found 1
./tuhi/ble.py:240:13: E126 continuation line over-indented for hanging indent
./tuhi/ble.py:241:17: E131 continuation line unaligned for hanging indent
./tuhi/ble.py:250:21: E126 continuation line over-indented for hanging indent
./tuhi/ble.py:263:43: W291 trailing whitespace
./tuhi/ble.py:272:72: W291 trailing whitespace
./tuhi/ble.py:310:1: W391 blank line at end of file

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
Benjamin Tissoires 2018-01-12 20:21:05 +01:00
parent af42bc1b27
commit 0d88d9d0e7
1 changed files with 23 additions and 23 deletions

View File

@ -11,9 +11,8 @@
# GNU General Public License for more details. # GNU General Public License for more details.
import logging import logging
import sys from gi.repository import GObject, Gio
from enum import Enum from .wacom import WACOM_CHRC_LIVE_PEN_DATA_UUID, WACOM_OFFLINE_CHRC_PEN_DATA_UUID, NORDIC_UART_CHRC_RX_UUID
from gi.repository import GObject, GLib, Gio
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('ble') logger = logging.getLogger('ble')
@ -23,6 +22,7 @@ ORG_BLUEZ_GATTSERVICE1 = 'org.bluez.GattService1'
ORG_BLUEZ_DEVICE1 = 'org.bluez.Device1' ORG_BLUEZ_DEVICE1 = 'org.bluez.Device1'
ORG_BLUEZ_ADAPTER1 = 'org.bluez.Adapter1' ORG_BLUEZ_ADAPTER1 = 'org.bluez.Adapter1'
class BlueZCharacteristic(GObject.Object): class BlueZCharacteristic(GObject.Object):
""" """
Abstraction for a org.bluez.GattCharacteristic1 object Abstraction for a org.bluez.GattCharacteristic1 object
@ -229,6 +229,7 @@ class BlueZDevice(GObject.Object):
def __repr__(self): def __repr__(self):
return 'Device {}:{}'.format(self.name, self.objpath) return 'Device {}:{}'.format(self.name, self.objpath)
class BlueZDeviceManager(GObject.Object): class BlueZDeviceManager(GObject.Object):
""" """
Manager object that connects to org.bluez's root object and handles the Manager object that connects to org.bluez's root object and handles the
@ -307,4 +308,3 @@ class BlueZDeviceManager(GObject.Object):
def _process_characteristic(self, obj): def _process_characteristic(self, obj):
objpath = obj.get_object_path() objpath = obj.get_object_path()
logger.debug('Characteristic {}'.format(objpath)) logger.debug('Characteristic {}'.format(objpath))