Skip to content

Commit

Permalink
bytes for all objects work
Browse files Browse the repository at this point in the history
  • Loading branch information
stsouko committed Mar 12, 2019
1 parent a9d7e79 commit bba4148
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions CGRtools/algorithms/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@


class HashableSmiles:
@cached_method
def __bytes__(self):
return sha512(str(self).encode()).digest()

def __hash__(self):
return hash(str(self))

Expand All @@ -62,6 +58,10 @@ def __eq__(self, other):


class StringCommon:
@cached_method
def __bytes__(self):
return sha512(str(self).encode()).digest()

def _flatten(self, weights):
node = self._node
adj = self._adj
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

setup(
name='CGRtools',
version='3.1.2',
version='3.1.3',
packages=['CGRtools', 'CGRtools.algorithms', 'CGRtools.attributes', 'CGRtools.containers', 'CGRtools.files',
'CGRtools.files.dll', 'CGRtools.periodictable', 'CGRtools.utils'],
url='https://github.com/cimm-kzn/CGRtools',
Expand Down

0 comments on commit bba4148

Please sign in to comment.