diff --git a/construct-stubs/__init__.pyi b/construct-stubs/__init__.pyi index d9493ff..858384d 100644 --- a/construct-stubs/__init__.pyi +++ b/construct-stubs/__init__.pyi @@ -205,6 +205,7 @@ __all__ = [ 'TerminatedError', 'this', 'Timestamp', + 'TimestampAdapter', 'TimestampError', 'Transformed', 'Tunnel', diff --git a/construct-stubs/core.pyi b/construct-stubs/core.pyi index 9117574..4403c05 100644 --- a/construct-stubs/core.pyi +++ b/construct-stubs/core.pyi @@ -607,22 +607,26 @@ if sys.version_info >= (3, 8): else: MSDOS = str +class TimestampAdapter( + Adapter[SubconParsedType, SubconBuildTypes, arrow.Arrow, arrow.Arrow] +): ... + @t.overload def Timestamp( subcon: Construct[int, int], unit: MSDOS, epoch: MSDOS -) -> Adapter[int, int, arrow.Arrow, arrow.Arrow]: ... +) -> TimestampAdapter[int, int]: ... @t.overload def Timestamp( subcon: Construct[int, int], unit: t.Union[int, float], epoch: t.Union[int, arrow.Arrow], -) -> Adapter[int, int, arrow.Arrow, arrow.Arrow]: ... +) -> TimestampAdapter[int, int]: ... @t.overload def Timestamp( subcon: Construct[float, float], unit: t.Union[int, float], epoch: t.Union[int, arrow.Arrow], -) -> Adapter[float, float, arrow.Arrow, arrow.Arrow]: ... +) -> TimestampAdapter[float, float]: ... K = t.TypeVar("K") V = t.TypeVar("V") diff --git a/requirements.txt b/requirements.txt index 3093f87..10c168b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -construct==2.10.64 +construct==2.10.66 pytest>=6.2.0 numpy>=1.20.* arrow diff --git a/setup.py b/setup.py index 0f5f5e2..c5d0975 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( url="https://github.com/timrid/construct-typing", author="Tim Riddermann", python_requires=">=3.7", - install_requires=["construct==2.10.64"], + install_requires=["construct==2.10.66"], keywords=[ "construct", "kaitai",