mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Rename r to result
This commit is contained in:
parent
224168a28f
commit
e00a9b1780
|
@ -72,19 +72,19 @@ class ErrorDetail(str):
|
|||
return self
|
||||
|
||||
def __eq__(self, other):
|
||||
r = super().__eq__(other)
|
||||
if r is NotImplemented:
|
||||
result = super().__eq__(other)
|
||||
if result is NotImplemented:
|
||||
return NotImplemented
|
||||
try:
|
||||
return r and self.code == other.code
|
||||
return result and self.code == other.code
|
||||
except AttributeError:
|
||||
return r
|
||||
return result
|
||||
|
||||
def __ne__(self, other):
|
||||
r = self.__eq__(other)
|
||||
if r is NotImplemented:
|
||||
result = self.__eq__(other)
|
||||
if result is NotImplemented:
|
||||
return NotImplemented
|
||||
return not r
|
||||
return not result
|
||||
|
||||
def __repr__(self):
|
||||
return 'ErrorDetail(string=%r, code=%r)' % (
|
||||
|
|
Loading…
Reference in New Issue
Block a user