diff --git a/clvm/SExp.py b/clvm/SExp.py index 9901849c..c368a2c7 100644 --- a/clvm/SExp.py +++ b/clvm/SExp.py @@ -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): @@ -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) diff --git a/tests/to_sexp_test.py b/tests/to_sexp_test.py index 92258ad9..73787a8f 100644 --- a/tests/to_sexp_test.py +++ b/tests/to_sexp_test.py @@ -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"