From 5234c8ef210ab21850235137f13558758f52fd6e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 17 Aug 2022 22:30:07 +0200 Subject: [PATCH] remove weird spaes --- files/helpers/sanitize.py | 2 +- files/helpers/stats.py | 2 +- files/routes/chat.py | 2 +- files/routes/feeds.py | 2 +- files/routes/reporting.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index b653aa060..046d581a8 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -245,7 +245,7 @@ def sanitize(sanitized, edit=False, limit_pings=False, showmore=True): v = getattr(g, 'v', None) matches = [m for m in mention_regex.finditer(sanitized) if m] - names = set( m.group(2) for m in matches ) + names = set(m.group(2) for m in matches) if limit_pings and len(names) > 3 and not v.admin_level: abort(406) users = get_users(names, graceful=True) diff --git a/files/helpers/stats.py b/files/helpers/stats.py index 7d92f3c48..e446dc886 100644 --- a/files/helpers/stats.py +++ b/files/helpers/stats.py @@ -62,7 +62,7 @@ def chart(kind, site): plt.rcParams['figure.figsize'] = (chart_width, 20) - signup_chart = plt.subplot2grid((chart_width, 20), ( 0, 0), rowspan=6, colspan=chart_width) + signup_chart = plt.subplot2grid((chart_width, 20), (0, 0), rowspan=6, colspan=chart_width) posts_chart = plt.subplot2grid((chart_width, 20), (10, 0), rowspan=6, colspan=chart_width) comments_chart = plt.subplot2grid((chart_width, 20), (20, 0), rowspan=6, colspan=chart_width) diff --git a/files/routes/chat.py b/files/routes/chat.py index 59e87d19f..5d6f45cc8 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -24,7 +24,7 @@ total = cache.get(f'{SITE}_total') or 0 @app.get("/chat") @auth_required -def chat( v): +def chat(v): return render_template("chat.html", v=v, messages=messages) diff --git a/files/routes/feeds.py b/files/routes/feeds.py index 2b6a41e5d..06f411a1d 100644 --- a/files/routes/feeds.py +++ b/files/routes/feeds.py @@ -71,4 +71,4 @@ def feeds_user(sort='hot', t='all'): with tag("content", type="html"): doc.cdata(f'''{post.realtitle(None)}
{post.realbody(None)}''') - return Response( ""+ doc.getvalue(), mimetype="application/xml") + return Response(""+ doc.getvalue(), mimetype="application/xml") diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 3aff38d94..9008c6701 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -79,7 +79,7 @@ def flag_comment(cid, v): comment = get_comment(cid) - existing = g.db.query(CommentFlag.comment_id).filter_by( user_id=v.id, comment_id=comment.id).one_or_none() + existing = g.db.query(CommentFlag.comment_id).filter_by(user_id=v.id, comment_id=comment.id).one_or_none() if existing: return "", 409 reason = request.values.get("reason", "").strip()