summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-09-22 14:01:57 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-09-22 14:04:10 +0200
commita5b062576bda29abe93504dbcb126e644d07f9dd (patch)
tree7a036e4ae103cd5002c0965940a8b6adc21886ca /django/utils
parentee0ef1b0948c19bc5fee06a6b9b4286b879f81c1 (diff)
Removed a few trailing backslashes.
We have always been at war with trailing backslashes.
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/encoding.py4
-rw-r--r--django/utils/feedgenerator.py2
-rw-r--r--django/utils/html_parser.py8
-rw-r--r--django/utils/http.py4
4 files changed, 9 insertions, 9 deletions
diff --git a/django/utils/encoding.py b/django/utils/encoding.py
index a7239f4b0f..bb07deb894 100644
--- a/django/utils/encoding.py
+++ b/django/utils/encoding.py
@@ -152,13 +152,13 @@ else:
smart_unicode = smart_text
force_unicode = force_text
-smart_str.__doc__ = """\
+smart_str.__doc__ = """
Apply smart_text in Python 3 and smart_bytes in Python 2.
This is suitable for writing to sys.stdout (for instance).
"""
-force_str.__doc__ = """\
+force_str.__doc__ = """
Apply force_text in Python 3 and force_bytes in Python 2.
"""
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py
index f7fec5e7f9..441935586d 100644
--- a/django/utils/feedgenerator.py
+++ b/django/utils/feedgenerator.py
@@ -272,7 +272,7 @@ class Rss201rev2Feed(RssFeed):
# Author information.
if item["author_name"] and item["author_email"]:
- handler.addQuickElement("author", "%s (%s)" % \
+ handler.addQuickElement("author", "%s (%s)" %
(item['author_email'], item['author_name']))
elif item["author_email"]:
handler.addQuickElement("author", item["author_email"])
diff --git a/django/utils/html_parser.py b/django/utils/html_parser.py
index 6ccb665249..2a408e9f55 100644
--- a/django/utils/html_parser.py
+++ b/django/utils/html_parser.py
@@ -59,8 +59,8 @@ else:
attrname, rest, attrvalue = m.group(1, 2, 3)
if not rest:
attrvalue = None
- elif attrvalue[:1] == '\'' == attrvalue[-1:] or \
- attrvalue[:1] == '"' == attrvalue[-1:]:
+ elif (attrvalue[:1] == '\'' == attrvalue[-1:] or
+ attrvalue[:1] == '"' == attrvalue[-1:]):
attrvalue = attrvalue[1:-1]
if attrvalue:
attrvalue = self.unescape(attrvalue)
@@ -72,8 +72,8 @@ else:
lineno, offset = self.getpos()
if "\n" in self.__starttag_text:
lineno = lineno + self.__starttag_text.count("\n")
- offset = len(self.__starttag_text) \
- - self.__starttag_text.rfind("\n")
+ offset = (len(self.__starttag_text)
+ - self.__starttag_text.rfind("\n"))
else:
offset = offset + len(self.__starttag_text)
self.error("junk characters in start tag: %r"
diff --git a/django/utils/http.py b/django/utils/http.py
index fb6c4b31ca..9ebbb88723 100644
--- a/django/utils/http.py
+++ b/django/utils/http.py
@@ -256,5 +256,5 @@ def is_safe_url(url, host=None):
if not url:
return False
url_info = urlparse(url)
- return (not url_info.netloc or url_info.netloc == host) and \
- (not url_info.scheme or url_info.scheme in ['http', 'https'])
+ return ((not url_info.netloc or url_info.netloc == host) and
+ (not url_info.scheme or url_info.scheme in ['http', 'https']))