mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 19:31:10 +00:00
Implement equality comparison of CompletableGithubObject (#201)
This commit is contained in:
@@ -213,6 +213,12 @@ class CompletableGithubObject(GithubObject):
|
||||
GithubObject.__init__(self, requester, headers, attributes, completed)
|
||||
self.__completed = completed
|
||||
|
||||
def __eq__(self, other):
|
||||
return other.__class__ is self.__class__ and other._url.value == self._url.value
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self == other
|
||||
|
||||
def _completeIfNotSet(self, value):
|
||||
if value is NotSet:
|
||||
self._completeIfNeeded()
|
||||
|
||||
Reference in New Issue
Block a user