-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: typing for generic BleakClient classes and the retry_bluetooth_c…
…onnection_error decorator (#86) * fix: typing for the generic BleakClient client class Using a bound TypeVar we can ensure that any client class we are dealing with is either BleakClient or a descendant of it and that type then stays consistent throughout the lifecycle. Signed-off-by: Felix Kaechele <felix@kaechele.ca> * fix: typing for the retry_bluetooth_connection_error decorator Use TypeVar together with ParamVar to drop the use of the unsafe cast operation. Signed-off-by: Felix Kaechele <felix@kaechele.ca> --------- Signed-off-by: Felix Kaechele <felix@kaechele.ca> Co-authored-by: J. Nick Koston <nick@koston.org>
- Loading branch information
Showing
2 changed files
with
22 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters