From 17d43740e4439512d7283c4af0469389018ef4f6 Mon Sep 17 00:00:00 2001 From: "J.P. Hutchins" <34154542+JPHutchins@users.noreply.github.com> Date: Sat, 30 Dec 2023 08:04:25 -0800 Subject: [PATCH] fix: incorrect mypy diagnosis of Unpack[ExtraArgs]. (#1488) --- AUTHORS.rst | 1 + CHANGELOG.rst | 1 + bleak/__init__.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 42973e11..3526f0dd 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -22,6 +22,7 @@ Contributors * Edward Betts * Robbe Gaeremynck * David Johansen +* JP Hutchins Sponsors -------- diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c7c560ca..df3317c0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,6 +22,7 @@ Changed Fixed ----- * Fixed BlueZ version in passive scanning error message. Fixes #1433. +* Fixed mypy requiring ``Unpack[ExtraArgs]`` that were intended to be optional. Fixes #1487. `0.21.1`_ (2023-09-08) ====================== diff --git a/bleak/__init__.py b/bleak/__init__.py index 880cd0af..e0126e0d 100644 --- a/bleak/__init__.py +++ b/bleak/__init__.py @@ -245,7 +245,7 @@ async def advertisement_data( finally: unregister_callback() - class ExtraArgs(TypedDict): + class ExtraArgs(TypedDict, total=False): """ Keyword args from :class:`~bleak.BleakScanner` that can be passed to other convenience methods.