From 4ed15e841cfc348819e9299dfd44259331926b9e Mon Sep 17 00:00:00 2001 From: Jinsung Ha Date: Wed, 16 Feb 2022 22:56:33 +0900 Subject: [PATCH] Fix convention according to flake8 --- modi/modi.py | 3 --- modi/task/ble_task/ble_task_mac.py | 6 ++---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/modi/modi.py b/modi/modi.py index 61e1740e..ebd0ca98 100644 --- a/modi/modi.py +++ b/modi/modi.py @@ -22,9 +22,6 @@ class MODI: network_uuids = {} def __call__(cls, *args, **kwargs): - #if cls not in cls.instances: - # cls.instances[cls] = super(MODI, cls).__call__(*args, **kwargs) - #return cls.instances[cls] network_uuid = kwargs.get('network_uuid') conn_type = kwargs.get('conn_type') if conn_type != 'ble': diff --git a/modi/task/ble_task/ble_task_mac.py b/modi/task/ble_task/ble_task_mac.py index 6962a55d..12ad92e8 100644 --- a/modi/task/ble_task/ble_task_mac.py +++ b/modi/task/ble_task/ble_task_mac.py @@ -36,7 +36,7 @@ def __init__(self, verbose=False, uuid=None): mac_client.BleakClientCoreBluetooth.get_services mac_client.BleakClientCoreBluetooth.get_services = \ self.mac_get_service - + @staticmethod async def mac_get_service(client): return None @@ -114,11 +114,9 @@ def close_conn(self): time.sleep(0.1) self._loop.run_until_complete(self.__close_client()) self._loop.close() - + def handle_disconnected(self, _): print('Device is being properly disconnected...') - #for task in aio.all_tasks(): - # task.cancel() def recv(self) -> Optional[str]: if self._recv_q.empty():