aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorTom Christie2015-02-09 17:43:20 +0000
committerTom Christie2015-02-09 17:43:20 +0000
commitb2939c157d32e604e10099be891e382d8c54bbec (patch)
tree6b164989c0b659a2d92051c3fbd6625306056ecb /rest_framework
parent0669f507b3a63114cf429f0662b1781f0e1fa5f8 (diff)
downloaddjango-rest-framework-b2939c157d32e604e10099be891e382d8c54bbec.tar.bz2
Fixes for latest version of pep8
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/templatetags/rest_framework.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py
index 69e03af4..d66ffb33 100644
--- a/rest_framework/templatetags/rest_framework.py
+++ b/rest_framework/templatetags/rest_framework.py
@@ -154,7 +154,9 @@ def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=Tru
If autoescape is True, the link text and URLs will get autoescaped.
"""
- trim_url = lambda x, limit=trim_url_limit: limit is not None and (len(x) > limit and ('%s...' % x[:max(0, limit - 3)])) or x
+ def trim_url(x, limit=trim_url_limit):
+ return limit is not None and (len(x) > limit and ('%s...' % x[:max(0, limit - 3)])) or x
+
safe_input = isinstance(text, SafeData)
words = word_split_re.split(force_text(text))
for i, word in enumerate(words):