Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions clvm/SExp.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def looks_like_clvm_object(o: typing.Any) -> bool:

# this function recognizes some common types and turns them into plain bytes,
def convert_atom_to_bytes(
v: typing.Union[bytes, str, int, None, list],
v: typing.Union[bytes, str, int, None],
) -> bytes:

if isinstance(v, bytes):
Expand All @@ -47,8 +47,6 @@ def convert_atom_to_bytes(
return int_to_bytes(v)
if v is None:
return b""
if v == []:
return b""
if hasattr(v, "__bytes__"):
return bytes(v)

Expand Down
1 change: 0 additions & 1 deletion tests/to_sexp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ def test_convert_atom(self):

assert convert_atom_to_bytes(b"foobar") == b"foobar"
assert convert_atom_to_bytes(None) == b""
assert convert_atom_to_bytes([]) == b""

assert convert_atom_to_bytes(DummyByteConvertible()) == b"foobar"

Expand Down