Skip to content

Commit 40328ca

Browse files
committed
fix: arc4_prefix annotated to also accept algopy.Bytes
1 parent d6c6dd2 commit 40328ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/_algopy_testing/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
from _algopy_testing.op.global_values import GlobalFields
3030

31+
_TBytes = typing.TypeVar("_TBytes", bytes, algopy.Bytes)
32+
3133

3234
def resolve_app_index(app_id_or_index: algopy.UInt64 | int) -> int:
3335
from _algopy_testing.context_helpers import lazy_context
@@ -168,7 +170,7 @@ def get_new_scratch_space() -> list[algopy.Bytes | algopy.UInt64]:
168170
return [algopy.UInt64(0)] * 256
169171

170172

171-
def arc4_prefix(value: bytes) -> bytes:
173+
def arc4_prefix(value: _TBytes) -> _TBytes:
172174
"""Return the value with the ARC4 prefix prepended."""
173175
return ARC4_RETURN_PREFIX + value
174176

0 commit comments

Comments
 (0)