From d3e380ba5f7051562690e97fb15258cf1bf8c1e3 Mon Sep 17 00:00:00 2001 From: Danny Staple Date: Sun, 13 Nov 2022 19:10:03 +0000 Subject: [PATCH] Reduce embellishments --- ch-13/1-modelling-space/computer/robot_ble_connection.py | 5 ++--- ch-13/2-displaying-a-pose/computer/robot_ble_connection.py | 5 ++--- .../computer/robot_ble_connection.py | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ch-13/1-modelling-space/computer/robot_ble_connection.py b/ch-13/1-modelling-space/computer/robot_ble_connection.py index 88b25b5..a302a15 100644 --- a/ch-13/1-modelling-space/computer/robot_ble_connection.py +++ b/ch-13/1-modelling-space/computer/robot_ble_connection.py @@ -1,5 +1,4 @@ import asyncio -import typing import bleak @@ -11,8 +10,8 @@ class BleConnection: adafruit_tx_uuid = "6E400002-B5A3-F393-E0A9-E50E24DCCA9E" ble_name = "Adafruit Bluefruit LE" - def __init__(self, receive_handler: typing.Callable[[bytes], None]): - self.ble_client : bleak.BleakClient = None + def __init__(self, receive_handler): + self.ble_client = None self.receive_handler = receive_handler def _uart_handler(self, _, data: bytes): diff --git a/ch-13/2-displaying-a-pose/computer/robot_ble_connection.py b/ch-13/2-displaying-a-pose/computer/robot_ble_connection.py index 88b25b5..a302a15 100644 --- a/ch-13/2-displaying-a-pose/computer/robot_ble_connection.py +++ b/ch-13/2-displaying-a-pose/computer/robot_ble_connection.py @@ -1,5 +1,4 @@ import asyncio -import typing import bleak @@ -11,8 +10,8 @@ class BleConnection: adafruit_tx_uuid = "6E400002-B5A3-F393-E0A9-E50E24DCCA9E" ble_name = "Adafruit Bluefruit LE" - def __init__(self, receive_handler: typing.Callable[[bytes], None]): - self.ble_client : bleak.BleakClient = None + def __init__(self, receive_handler): + self.ble_client = None self.receive_handler = receive_handler def _uart_handler(self, _, data: bytes): diff --git a/ch-13/3-moving-poses-with-sensors/computer/robot_ble_connection.py b/ch-13/3-moving-poses-with-sensors/computer/robot_ble_connection.py index 88b25b5..a302a15 100644 --- a/ch-13/3-moving-poses-with-sensors/computer/robot_ble_connection.py +++ b/ch-13/3-moving-poses-with-sensors/computer/robot_ble_connection.py @@ -1,5 +1,4 @@ import asyncio -import typing import bleak @@ -11,8 +10,8 @@ class BleConnection: adafruit_tx_uuid = "6E400002-B5A3-F393-E0A9-E50E24DCCA9E" ble_name = "Adafruit Bluefruit LE" - def __init__(self, receive_handler: typing.Callable[[bytes], None]): - self.ble_client : bleak.BleakClient = None + def __init__(self, receive_handler): + self.ble_client = None self.receive_handler = receive_handler def _uart_handler(self, _, data: bytes):