1
0
Fork 0

Make the LSP server happy

This commit is contained in:
Daniele Tricoli 2023-03-08 06:34:04 +01:00
parent 4a0543cf15
commit 1bc2efdeba

View file

@ -63,11 +63,11 @@ class Client:
await self._client.disconnect()
async def start(self):
if self._client is not None:
if self._client and self.uart_rx_char:
await self._client.start_notify(self.uart_rx_char, self.on_rx)
async def stop(self):
if self._client is not None:
if self._client and self.uart_rx_char:
await self._client.stop_notify(self.uart_rx_char)
def set_receive_callback(self, callback: Callable[[Any], None]):
@ -88,7 +88,7 @@ class Client:
self.disconnect_event.set()
async def send(self, data):
if self._client is not None:
if self._client and self.uart_tx_char:
await self._client.write_gatt_char(self.uart_tx_char, data)
async def send_forever(self, data: bytes, sleep_time: float):