Skip to content

Commit b284def

Browse files
committed
removed changes to conversions.py
1 parent 04e56e1 commit b284def

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/ethereum_test_base_types/conversions.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,11 @@
33
from re import sub
44
from typing import Any, List, Optional, SupportsBytes, TypeAlias
55

6-
from pytest_plugins.logging import get_logger
7-
86
BytesConvertible: TypeAlias = str | bytes | SupportsBytes | List[int]
97
FixedSizeBytesConvertible: TypeAlias = str | bytes | SupportsBytes | List[int] | int
108
NumberConvertible: TypeAlias = str | bytes | SupportsBytes | int
119

1210

13-
logger = get_logger(__name__)
14-
15-
1611
def int_or_none(input_value: Any, default: Optional[int] = None) -> int | None:
1712
"""Convert a value to int or returns a default (None)."""
1813
if input_value is None:
@@ -52,16 +47,6 @@ def to_bytes(input_bytes: BytesConvertible) -> bytes:
5247
input_bytes = "0" + input_bytes
5348
return bytes.fromhex(input_bytes)
5449

55-
# handle wrapper_version field for >= osaka
56-
if isinstance(input_bytes, int):
57-
assert input_bytes < 256, f"Expected int that fits into one byte, but got {input_bytes}"
58-
return input_bytes.to_bytes(1, byteorder="big")
59-
60-
logger.error(
61-
f"This type of input_bytes is not yet supported: {type(input_bytes)}\n\n"
62-
f"input_bytes: {input_bytes}"
63-
)
64-
6550
raise Exception("invalid type for `bytes`")
6651

6752

0 commit comments

Comments
 (0)