Skip to content

Commit c36cc1e

Browse files
committed
move the unpacker type var inside the unpacker class to ensure clean a mypy run
Signed-off-by: Oleg Höfling <oleg.hoefling@gmail.com>
1 parent bad9311 commit c36cc1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

msgpack/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ else:
2727
SupportsRead = BinaryIO
2828
SupportsWrite = BinaryIO
2929

30-
_U = TypeVar("_U", bound=Unpacker)
3130
_S = TypeVar("_S", bound=SupportsRead)
3231

3332
_ObjectHook = Callable[[Dict[Any, Any]], Any]
@@ -57,6 +56,7 @@ class ExtType(NamedTuple):
5756
data: bytes
5857

5958
class Unpacker(Generic[_S]):
59+
_U = TypeVar("_U", bound="Unpacker[_S]")
6060
file_like: Optional[_S]
6161
def __init__(
6262
self,

0 commit comments

Comments
 (0)