From 2e90c5acd361bbaf61d7ed25d49fd0f397b3b11a Mon Sep 17 00:00:00 2001 From: awiebe Date: Fri, 25 Aug 2023 17:23:36 -0700 Subject: [PATCH] Sort imports to please flak8 --- rest_framework/throttling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework/throttling.py b/rest_framework/throttling.py index c0a9ed6fc..adc854a87 100644 --- a/rest_framework/throttling.py +++ b/rest_framework/throttling.py @@ -1,8 +1,8 @@ """ Provides various throttling policies. """ -import time import re +import time from django.core.cache import cache as default_cache from django.core.exceptions import ImproperlyConfigured @@ -113,7 +113,7 @@ class SimpleRateThrottle(BaseThrottle): m = re.search(self._RATE_DENOMINATOR_REGEX, denominator) dg = m.groups() - dn= int(m[0]) if len(m[0])>0 else 1 + dn= int(m[0]) if len(m[0]) > 0 else 1 du = m[1][0] duration = {'s': 1, 'm': 60, 'h': 3600, 'd': 86400}[du]