From 29d2608c37998168b7dc96d286b6f12ef5750c1d Mon Sep 17 00:00:00 2001 From: Tim Rid <6593626+timrid@users.noreply.github.com> Date: Sun, 13 Feb 2022 01:06:45 +0100 Subject: [PATCH 1/3] fixed BuildTypes of cs.Const --- construct-stubs/core.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, From 5533a7923e3abed7c8b6f4f06b1e77bf39726ca8 Mon Sep 17 00:00:00 2001 From: Tim Rid <6593626+timrid@users.noreply.github.com> Date: Sun, 13 Feb 2022 01:10:20 +0100 Subject: [PATCH 2/3] fixed "potential security vulnerabilities" from github --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 834d244eda588323f28f45f17bc1f276b058088b Mon Sep 17 00:00:00 2001 From: Tim Rid <6593626+timrid@users.noreply.github.com> Date: Sun, 13 Feb 2022 01:14:01 +0100 Subject: [PATCH 3/3] ignore mypy error "Call to untyped function "load" in typed context" --- tests/test_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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