From 5838c9a4d3e298e4946e814ba253a8aa5afcf9cf Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 17 Sep 2025 09:31:22 -0400 Subject: [PATCH 1/2] bound a typevar --- clvm/serialize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clvm/serialize.py b/clvm/serialize.py index 3d4a4bae..e0a683d1 100644 --- a/clvm/serialize.py +++ b/clvm/serialize.py @@ -28,7 +28,7 @@ MAX_SAFE_BYTES = 2_000_000 -T = typing.TypeVar("T") +T = typing.TypeVar("T", bound=CLVMStorage) _T_CLVMStorage = typing.TypeVar("_T_CLVMStorage", bound=CLVMStorage) CS = typing.TypeVar("CS", bound=CLVMStorage) From f1cd036c85aa73b50b749065f4e7b7df01fcc1a8 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 17 Sep 2025 09:46:59 -0400 Subject: [PATCH 2/2] or this maybe --- clvm/serialize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clvm/serialize.py b/clvm/serialize.py index e0a683d1..2d708926 100644 --- a/clvm/serialize.py +++ b/clvm/serialize.py @@ -28,7 +28,7 @@ MAX_SAFE_BYTES = 2_000_000 -T = typing.TypeVar("T", bound=CLVMStorage) +T = typing.TypeVar("T") _T_CLVMStorage = typing.TypeVar("_T_CLVMStorage", bound=CLVMStorage) CS = typing.TypeVar("CS", bound=CLVMStorage) @@ -44,7 +44,7 @@ ["OpStackType[T]", ValStackType, typing.BinaryIO, ToCLVMStorage[T]], ValStackType ] -OpStackType = typing.List[OpCallable[T]] +OpStackType = typing.List[OpCallable[_T_CLVMStorage]] def sexp_to_byte_iterator(