Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nanocoh committed Jan 4, 2025
1 parent d983efb commit c94b104
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/najaeda/najaeda/netlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import hashlib
# import json
from najaeda import snl
import struct
#import struct


def consistent_hash(obj):
Expand Down Expand Up @@ -43,13 +43,13 @@ def hash_value(value):

def hash_object(o):
if isinstance(o, (list, tuple)):
return b''.join(hash_object(i) for i in o)
return b''.join(hash_object(i) for i in o)
# elif isinstance(o, dict):
# return b''.join(hash_object(k) + hash_object(v) for k, v in sorted(o.items()))
# elif isinstance(o, set):
# return b''.join(hash_object(i) for i in sorted(o))
else:
return hash_value(o)
return hash_value(o)

serialized_obj = default_serializer(obj)
obj_bytes = hash_object(serialized_obj)
Expand Down

0 comments on commit c94b104

Please sign in to comment.