Rename r to result

This commit is contained in:
Łukasz Wieczorek 2022-08-01 17:05:46 +02:00
parent 224168a28f
commit e00a9b1780

View File

@ -72,19 +72,19 @@ class ErrorDetail(str):
return self return self
def __eq__(self, other): def __eq__(self, other):
r = super().__eq__(other) result = super().__eq__(other)
if r is NotImplemented: if result is NotImplemented:
return NotImplemented return NotImplemented
try: try:
return r and self.code == other.code return result and self.code == other.code
except AttributeError: except AttributeError:
return r return result
def __ne__(self, other): def __ne__(self, other):
r = self.__eq__(other) result = self.__eq__(other)
if r is NotImplemented: if result is NotImplemented:
return NotImplemented return NotImplemented
return not r return not result
def __repr__(self): def __repr__(self):
return 'ErrorDetail(string=%r, code=%r)' % ( return 'ErrorDetail(string=%r, code=%r)' % (