Skip to content

Commit

Permalink
Fixing style
Browse files Browse the repository at this point in the history
  • Loading branch information
afsafzal committed Oct 3, 2018
1 parent 08b31e5 commit d5b7c30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions houston/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def __eq__(self, other: 'Environment') -> bool:
return self.to_json() == other.to_json()

def __hash__(self) -> int:
l = list(self.__values.copy().items())
sl = sorted(l, key=lambda x: x[0])
return hash(tuple(sl))
vals = list(self.__values.copy().items())
sorted_vals = sorted(vals, key=lambda x: x[0])
return hash(tuple(sorted_vals))

def to_json(self) -> Dict[str, Any]:
return {'constants': self.__values.copy()}

0 comments on commit d5b7c30

Please sign in to comment.