Skip to content

Commit 2e7192c

Browse files
committed
use consistent type annotations for generic types
Add a few more that were missed in commit a242cfb.
1 parent aa9ab9c commit 2e7192c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

bleak/backends/bluezdbus/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def __init__(self) -> None:
176176
self._properties: dict[str, dict[str, dict[str, Any]]] = {}
177177

178178
# set of available adapters for quick lookup
179-
self._adapters = set[str]()
179+
self._adapters: set[str] = set()
180180

181181
# The BlueZ APIs only maps children to parents, so we need to keep maps
182182
# to quickly find the children of a parent D-Bus object.

examples/async_callback_with_queue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ async def run_queue_consumer(queue: asyncio.Queue[tuple[float, Optional[bytearra
8888
logger.info("Received callback data via async queue at %s: %r", epoch, data)
8989

9090

91-
async def main(args: Args):
92-
queue = asyncio.Queue[tuple[float, Optional[bytearray]]]()
91+
async def main(args: Args) -> None:
92+
queue: asyncio.Queue[tuple[float, Optional[bytearray]]] = asyncio.Queue()
9393
client_task = run_ble_client(args, queue)
9494
consumer_task = run_queue_consumer(queue)
9595

examples/mtu_size.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
CHAR_UUID = "00000000-0000-0000-0000-000000000000"
1212

1313

14-
async def main():
15-
queue = asyncio.Queue[BLEDevice]()
14+
async def main() -> None:
15+
queue: asyncio.Queue[BLEDevice] = asyncio.Queue()
1616

1717
def callback(device: BLEDevice, adv: AdvertisementData) -> None:
1818
# can use advertising data to filter here

0 commit comments

Comments
 (0)