projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
7e86cba
f5054b5
)
Merge branch 'master' into patch-1
author
mohammed chamma
<hms.mohammed@gmail.com>
Wed, 30 Dec 2020 23:45:08 +0000
(18:45 -0500)
committer
GitHub
<noreply@github.com>
Wed, 30 Dec 2020 23:45:08 +0000
(18:45 -0500)
1
2
tweepy/models.py
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
tweepy/models.py
index ac0de530a85bab8ab23595efd7b79c1b944b67d6,476eb062d96a24eefd11100ea57396513fb84b47..a7a5c6d5862018d052b738de174f7f8bef562b2b
---
1
/
tweepy/models.py
---
2
/
tweepy/models.py
+++ b/
tweepy/models.py
@@@
-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