From 15bd33a98df2caec13aeb7e8deebb3d37c10ea5a Mon Sep 17 00:00:00 2001 From: Hal Blackburn Date: Sun, 2 Feb 2025 15:47:32 +0000 Subject: [PATCH 1/2] chore: remove duplicate imports in _pycompat.typing --- src/denokv/_pycompat/typing.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/denokv/_pycompat/typing.py b/src/denokv/_pycompat/typing.py index c2f2e47..b67405c 100644 --- a/src/denokv/_pycompat/typing.py +++ b/src/denokv/_pycompat/typing.py @@ -97,8 +97,6 @@ from typing_extensions import TypeAlias as TypeAlias from typing_extensions import TypeGuard as TypeGuard from typing_extensions import TypeIs as TypeIs - from typing_extensions import TypeVarTuple as TypeVarTuple - from typing_extensions import Unpack as Unpack else: Never = "Never" ParamSpec = "ParamSpec" @@ -106,8 +104,6 @@ TypeAlias = "TypeAlias" TypeGuard = "TypeGuard" TypeIs = "TypeIs" - # TypeVarTuple = "TypeVarTuple" - # Unpack = "Unpack" if TYPE_CHECKING: from typing_extensions import TypeVar as TypeVar From 4b31fb4c9c0c67f4e5251d8478c243e22f15ba24 Mon Sep 17 00:00:00 2001 From: Hal Blackburn Date: Sun, 2 Feb 2025 15:47:59 +0000 Subject: [PATCH 2/2] fix: return the input value in assert_type() It was returning None at runtime, which is incorrect. --- src/denokv/_pycompat/typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/denokv/_pycompat/typing.py b/src/denokv/_pycompat/typing.py index b67405c..f809a42 100644 --- a/src/denokv/_pycompat/typing.py +++ b/src/denokv/_pycompat/typing.py @@ -177,4 +177,4 @@ def assert_never(value: Never, /) -> Never: else: def assert_type(val: _T, typ: Any, /) -> _T: - pass + return val