Skip to content

Commit

Permalink
Fix super() invocation for Python 2.7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mina86 committed Jul 10, 2022
1 parent d30106f commit c2611e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygtrie.py
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ def __eq__(self, other):
result = self._eq_impl(other)
if result is not NotImplemented:
return result
return super().__eq__(other)
return super(Trie, self).__eq__(other)

def _eq_impl(self, other):
return self._root.equals(other._root) # pylint: disable=protected-access
Expand Down Expand Up @@ -1654,7 +1654,7 @@ def _eq_impl(self, other):
# different trie structure.
if self._separator != other._separator: # pylint: disable=protected-access
return NotImplemented
return super()._eq_impl(other)
return super(StringTrie, self)._eq_impl(other)

def _path_from_key(self, key):
return key.split(self._separator)
Expand Down

0 comments on commit c2611e8

Please sign in to comment.