From 16e88c64be1679cd46d78e71e9491fb02f207e7b Mon Sep 17 00:00:00 2001 From: Serhii Tereshchenko Date: Wed, 20 Nov 2024 10:39:35 +0200 Subject: [PATCH] chore: Use static method --- rest_framework/exceptions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py index cba5757a5..6088f71b0 100644 --- a/rest_framework/exceptions.py +++ b/rest_framework/exceptions.py @@ -237,7 +237,8 @@ class Throttled(APIException): self.wait = wait super().__init__(detail, code) - def extra_detail(self, wait): + @staticmethod + def extra_detail(wait): return ngettext( 'Expected available in {wait} second.', 'Expected available in {wait} seconds.',