comparison mercurial/upgrade.py @ 32028:99f63f476a72

upgrade: implement '__ne__' on 'improvement' class The pythonomicon request its implementation.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 17 Apr 2017 13:07:22 +0200
parents 3c77f03f16b3
children 9e35848fa007
comparison
equal deleted inserted replaced
32027:8b7f794d6a9d 32028:99f63f476a72
141 def __eq__(self, other): 141 def __eq__(self, other):
142 if not isinstance(other, improvement): 142 if not isinstance(other, improvement):
143 # This is what python tell use to do 143 # This is what python tell use to do
144 return NotImplemented 144 return NotImplemented
145 return self.name == other.name 145 return self.name == other.name
146
147 def __ne__(self, other):
148 return not self == other
146 149
147 def finddeficiencies(repo): 150 def finddeficiencies(repo):
148 """returns a list of deficiencies that the repo suffer from""" 151 """returns a list of deficiencies that the repo suffer from"""
149 newreporeqs = localrepo.newreporequirements(repo) 152 newreporeqs = localrepo.newreporequirements(repo)
150 153