@@ -241,6 +241,12 @@ def __init__(self, comment, session):
241241 self .html_url = self .links .get ('html' )
242242 self .pull_request_url = self .links .get ('pull_request' )
243243
244+ def __eq__ (self , other ):
245+ return self .id == other .id
246+
247+ def __ne__ (self , other ):
248+ return self .id != other .id
249+
244250 def _update_ (self , comment ):
245251 self .__init__ (comment , self ._session )
246252
@@ -286,6 +292,12 @@ def __init__(self, commit, session):
286292 i = self ._api .rfind ('/' )
287293 self .sha = self ._api [i + 1 :]
288294
295+ def __eq__ (self , other ):
296+ return self .sha == other .sha
297+
298+ def __ne__ (self , other ):
299+ return self .sha != other .sha
300+
289301
290302class BaseAccount (GitHubCore ):
291303 """The :class:`BaseAccount <BaseAccount>` object. This is used to do the
@@ -346,8 +358,11 @@ def __init__(self, acct, session):
346358 #: Markdown formatted biography
347359 self .bio = acct .get ('bio' )
348360
349- def __eq__ (self , acc ):
350- return self .id == acc .id
361+ def __eq__ (self , other ):
362+ return self .id == other .id
363+
364+ def __ne__ (self , other ):
365+ return self .id != other .id
351366
352367 def __repr__ (self ):
353368 return '<{s.type} [{s.login}:{s.name}]>' .format (s = self )
0 commit comments