From f9f694dfcfd7d7801c37f2b08330e04f61c010e3 Mon Sep 17 00:00:00 2001 From: Josh Wu Date: Mon, 8 May 2023 14:56:20 +0800 Subject: [PATCH] Replace list[] legacy typing --- bumble/device.py | 2 +- bumble/gatt.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bumble/device.py b/bumble/device.py index 72fd7550..258a43d6 100644 --- a/bumble/device.py +++ b/bumble/device.py @@ -889,7 +889,7 @@ def host_event_handler(function): # List of host event handlers for the Device class. # (we define this list outside the class, because referencing a class in method # decorators is not straightforward) -device_host_event_handlers: list[str] = [] +device_host_event_handlers: List[str] = [] # ----------------------------------------------------------------------------- diff --git a/bumble/gatt.py b/bumble/gatt.py index e57f0a60..9721fd4c 100644 --- a/bumble/gatt.py +++ b/bumble/gatt.py @@ -206,7 +206,7 @@ class Service(Attribute): uuid: UUID - def __init__(self, uuid, characteristics: list[Characteristic], primary=True): + def __init__(self, uuid, characteristics: List[Characteristic], primary=True): # Convert the uuid to a UUID object if it isn't already if isinstance(uuid, str): uuid = UUID(uuid)