forked from VimPlug/jedi
statical analysis shouldn't report the exact same error twice
This commit is contained in:
@@ -37,6 +37,16 @@ class Error(object):
|
||||
def __str__(self):
|
||||
return '%s: %s:%s' % (self.code, self.line, self.description())
|
||||
|
||||
def __eq__(self, other):
|
||||
return (self.path == other.path and self.name == other.name
|
||||
and self._start_pos == other._start_pos)
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self.__eq__(other)
|
||||
|
||||
def __hash__(self):
|
||||
return hash((self.path, self._start_pos, self.name))
|
||||
|
||||
def __repr__(self):
|
||||
return '<%s %s: %s@%s,%s' % (self.__class__.__name__,
|
||||
self.name, self.path,
|
||||
|
||||
Reference in New Issue
Block a user