diff --git a/src/smpclient/__init__.py b/src/smpclient/__init__.py index 1d81e14..c471166 100644 --- a/src/smpclient/__init__.py +++ b/src/smpclient/__init__.py @@ -35,6 +35,8 @@ """ +from __future__ import annotations + import asyncio import itertools import logging @@ -60,8 +62,6 @@ if TYPE_CHECKING: from types_bits import u8 -else: # `types_bits` is typing-only; reaching its values at runtime needs its `rt` extra - u8 = int try: from asyncio import timeout # type: ignore @@ -143,7 +143,7 @@ def success( def wrapping_sequence() -> Iterator[u8]: """The default SMP sequence space: `0x00`-`0xFF`, wrapping.""" - return cast(Iterator[u8], itertools.cycle(range(0x100))) + return cast("Iterator[u8]", itertools.cycle(range(0x100))) def _hexdump(frame: bytes) -> str: