pylint; whitespace cleanup

This commit is contained in:
urlbot
2015-08-21 23:36:25 +02:00
parent 5f27fea8fc
commit 29aa2b4872
2 changed files with 33 additions and 33 deletions

View File

@@ -87,7 +87,7 @@ def parse_mental_ill(**args):
c += 1
else:
c = 0
if (min_ill <= c):
if min_ill <= c:
flag = True
break

View File

@@ -69,8 +69,8 @@ def extract_title(url):
return (1, headers['content-type'])
charset = re.sub(
'.*charset=(?P<charset>\S+).*',
'\g<charset>', headers['content-type'], re.IGNORECASE
r'.*charset=(?P<charset>\S+).*',
r'\g<charset>', headers['content-type'], re.IGNORECASE
)
if '' != charset:
@@ -145,7 +145,7 @@ def ratelimit_exceeded(ignored=None): # FIXME: separate counters
return False
def extract_url(data, msg_obj):
result = re.findall("(https?://[^\s>]+)", data)
result = re.findall(r'(https?://[^\s>]+)', data)
if not result:
return
@@ -189,7 +189,7 @@ def extract_url(data, msg_obj):
elif 1 == status:
if conf('image_preview'):
# of course it's fake, but it looks interesting at least
char = """,._-+=\|/*`~"'"""
char = r""",._-+=\|/*`~"'"""
message = 'No text but %s, 1-bit ASCII art preview: [%c]' % (
title, random.choice(char)
)