1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Corrected many style guide violations that the newest version of flake8 catches

This commit is contained in:
Alex Gaynor
2014-03-30 12:11:05 -07:00
parent 92dbf34286
commit 778ce245dd
39 changed files with 55 additions and 54 deletions

View File

@@ -268,7 +268,7 @@ def urlize(text, trim_url_limit=None, nofollow=False, autoescape=False):
url = smart_urlquote(middle)
elif simple_url_2_re.match(middle):
url = smart_urlquote('http://%s' % middle)
elif not ':' in middle and simple_email_re.match(middle):
elif ':' not in middle and simple_email_re.match(middle):
local, domain = middle.rsplit('@', 1)
try:
domain = domain.encode('idna').decode('ascii')