Merge branch 'master' into patch-1
authormohammed chamma <hms.mohammed@gmail.com>
Wed, 30 Dec 2020 23:45:08 +0000 (18:45 -0500)
committerGitHub <noreply@github.com>
Wed, 30 Dec 2020 23:45:08 +0000 (18:45 -0500)
1  2 
tweepy/models.py

index ac0de530a85bab8ab23595efd7b79c1b944b67d6,476eb062d96a24eefd11100ea57396513fb84b47..a7a5c6d5862018d052b738de174f7f8bef562b2b
@@@ -217,20 -211,7 +211,13 @@@ class User(Model)
  
          return NotImplemented
  
-     def __ne__(self, other):
-         result = self == other
-         if result is NotImplemented:
-             return result
-         return not result
-     
 +    def __hash__(self):
 +        if hasattr(self, 'id'):
 +            return self.id
 +        else:
 +            raise TypeError('unhashable type: {} (no id attribute)'.format(type(self)))
 +
  class DirectMessage(Model):
  
      @classmethod