diff --git a/construct-stubs/core.pyi b/construct-stubs/core.pyi index a5603ac..010f471 100644 --- a/construct-stubs/core.pyi +++ b/construct-stubs/core.pyi @@ -526,7 +526,7 @@ class Const(Subconstruct[SubconParsedType, SubconBuildTypes, ParsedType, BuildTy def __new__( cls, value: bytes, - ) -> Const[None, None, bytes, Bytes[bytes, int]]: ... + ) -> Const[None, None, bytes, t.Optional[bytes]]: ... @t.overload def __new__( cls, diff --git a/requirements.txt b/requirements.txt index 0836710..2d70b89 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ construct==2.10.67 pytest>=6.2.0 -numpy==1.20.* +numpy==1.21.* arrow ruamel.yaml cloudpickle diff --git a/tests/test_core.py b/tests/test_core.py index 96b9b91..6f65772 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -634,7 +634,7 @@ def test_numpy() -> None: @pytest.mark.xfail(reason="docs stated that it throws StreamError, not true at all") def test_numpy_error() -> None: import numpy, io - numpy.load(io.BytesIO(b"")) + numpy.load(io.BytesIO(b"")) # type: ignore def test_namedtuple() -> None: import collections