Highlights
🐛 Latent runtime bugs fixed
A project-wide static type-checking pass surfaced (and fixed) a number of real, pre-existing bugs:
- Restore — a missing
awaitin the iOS 18+ SE and Rose firmware-personalization paths (the coroutine was used instead of its result); andadd_timer_tagspassed the parameters dict as its own lookup key, raising unconditionally. - Device activation — a call to a method that no longer exists (a leftover from the asyncio migration) broke
activate/deactivate. - Screen streaming —
stopScreencastcalled a removed method, and image resizing usedImage.ANTIALIAS, which was removed in Pillow 10. - Remote discovery —
get_remoted_devicesused a synchronouswithon an async-only context manager, so it could never run. - Installation —
upgrade()leaked extra arguments into an unrelated boolean flag.
🔍 The codebase is now type-checked (pyright, enforced in CI)
The whole package (and its tests) passes pyright in standard mode with zero errors, wired into both a pre-commit hook and a dedicated CI job (pinned to pyright@1.1.411). Type annotations are now honest about nullability and prerequisites — Optional-vs-required, raising accessors for connection state, @overloads where a return type depends on an argument — which both hardens the library and makes it far more IDE- and contributor-friendly. typing_extensions is now a direct dependency.
What's Changed
Full Changelog: v9.39.0...v9.40.0