diff --git a/construct-stubs/core.pyi b/construct-stubs/core.pyi index 83a7525..093199f 100644 --- a/construct-stubs/core.pyi +++ b/construct-stubs/core.pyi @@ -30,7 +30,7 @@ from construct.lib import ( # type hint. But for supporting pyright/pylance, the same type hint has to be used as the return type of __new__. # (see discussion here: https://github.com/python/typeshed/issues/4846). -StreamType = t.BinaryIO +StreamType = t.IO[bytes] FilenameType = t.Union[str, bytes, os.PathLike[str], os.PathLike[bytes]] PathType = str ContextKWType = t.Any