From e00a9b17808764083d8b56cc95e0ae9f276f3d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Wieczorek?= Date: Mon, 1 Aug 2022 17:05:46 +0200 Subject: [PATCH] Rename r to result --- rest_framework/exceptions.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py index d21606770..99b03eec8 100644 --- a/rest_framework/exceptions.py +++ b/rest_framework/exceptions.py @@ -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)' % (