commit aa2b306be10c100cecc969745095ad6183086a0a
parent c786059c93fd557a3a43cd1a706343714af1b969
Author: parazyd <parazyd@dyne.org>
Date: Wed, 23 Jan 2019 15:23:31 +0100
Linting.
Diffstat:
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/diaspora.py b/diaspora.py
@@ -384,8 +384,8 @@ def following():
j = find_user_by_email(i)
if j:
countries = sql_select_col_where('disembark', 'email', j['email'])
- for i in countries:
- cnt.append((i[0], getcountryname(i[0])))
+ for k in countries:
+ cnt.append((k[0], getcountryname(k[0])))
fol.append((j['id'], j['name']))
return render_template('following.html', following=fol, countries=cnt)
diff --git a/utils.py b/utils.py
@@ -281,7 +281,6 @@ def get_latest_messages(user_id):
data[-1]['message'] = data[-1]['message'][:64] + "..."
latest.append([user['name'], user['id'], data[-1]])
-
return sorted(latest, key=lambda x: x[2]['time'], reverse=True)
@@ -406,7 +405,6 @@ def get_shouts(email):
with open(join('shouts', email)) as shouts:
shouts = json.load(shouts)
-
return shouts[::-1]