Easy spacing fixes, trailing stuff

Remove useless trailing \
Remove trailing spaces
Add missing empty lines

autopep8 -ir -j2 --select=E301,E302,E502,W291,W293,W391 .

Diff quickly checked.
This commit is contained in:
Laurent Bachelier 2013-03-15 20:01:49 +01:00
commit 7094931c92
231 changed files with 474 additions and 67 deletions

View file

@ -31,9 +31,11 @@ REGEXPS = {'/users/%s/journaux/%s': 'D%s.%s',
'/forums/%s/posts/%s': 'B%s.%s',
}
def f2re(f):
return '.*' + f.replace('%s', '([^ /]+)')
def rssid(entry):
m = RSSID_RE.match(entry.id)
if not m:
@ -53,6 +55,7 @@ def rssid(entry):
else:
return '%s.%s' % (ind, m.group(2))
def id2url(id):
m = ID2URL_RE.match(id)
if not m:
@ -67,6 +70,7 @@ def id2url(id):
else:
return url_re % m.group(3)
def url2id(url):
for url_re, id_re in REGEXPS.iteritems():
m = re.match(f2re(url_re), url)
@ -75,6 +79,7 @@ def url2id(url):
return id_re % m.groups()
def id2threadid(id):
m = ID2URL_RE.match(id)
if m: