Update alerts reported by LGTM

This commit is contained in:
Griatch 2017-09-23 16:46:30 +02:00
parent ce73bf1a93
commit b3c6e9d2cc
10 changed files with 42 additions and 10 deletions

View file

@ -215,6 +215,9 @@ class _SaverMutable(object):
def __eq__(self, other):
return self._data == other
def __ne__(self, other):
return self._data != other
@_save
def __setitem__(self, key, value):
self._data.__setitem__(key, self._convert_mutables(value))
@ -248,6 +251,13 @@ class _SaverList(_SaverMutable, MutableSequence):
except TypeError:
return False
def __ne__(self, other):
try:
return list(self._data) != list(other)
except TypeError:
return True
def index(self, value, *args):
return self._data.index(value, *args)