mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-18 04:02:35 +03:00
Sort imports to please flak8
This commit is contained in:
parent
3dce5b782d
commit
2e90c5acd3
|
@ -1,8 +1,8 @@
|
||||||
"""
|
"""
|
||||||
Provides various throttling policies.
|
Provides various throttling policies.
|
||||||
"""
|
"""
|
||||||
import time
|
|
||||||
import re
|
import re
|
||||||
|
import time
|
||||||
|
|
||||||
from django.core.cache import cache as default_cache
|
from django.core.cache import cache as default_cache
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
@ -113,7 +113,7 @@ class SimpleRateThrottle(BaseThrottle):
|
||||||
m = re.search(self._RATE_DENOMINATOR_REGEX, denominator)
|
m = re.search(self._RATE_DENOMINATOR_REGEX, denominator)
|
||||||
dg = m.groups()
|
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]
|
du = m[1][0]
|
||||||
|
|
||||||
duration = {'s': 1, 'm': 60, 'h': 3600, 'd': 86400}[du]
|
duration = {'s': 1, 'm': 60, 'h': 3600, 'd': 86400}[du]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user