From d5a46b69a602611cde980394ecf0f21a7975baae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sat, 15 Jan 2022 17:06:20 +0100 Subject: [PATCH] Include flake8-print plugin This alerts us of stray print statements, which should never occur because this is a non-TUI application. --- .github/workflows/main.yaml | 2 +- snikket_web/admin.py | 2 -- snikket_web/user.py | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 09d78e4..b2c1060 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -45,7 +45,7 @@ jobs: - name: Install run: | set -euo pipefail - pip install flake8 + pip install flake8 flake8-print - name: Linting run: | python -m flake8 snikket_web diff --git a/snikket_web/admin.py b/snikket_web/admin.py index 39fea15..b7476d2 100644 --- a/snikket_web/admin.py +++ b/snikket_web/admin.py @@ -542,8 +542,6 @@ async def edit_circle(id_: str) -> typing.Union[str, quart.Response]: ) return redirect(url_for(".edit_circle", id_=id_)) - else: - print(form.errors) return await render_template( "admin_edit_circle.html", diff --git a/snikket_web/user.py b/snikket_web/user.py index a51ec37..b627703 100644 --- a/snikket_web/user.py +++ b/snikket_web/user.py @@ -138,7 +138,6 @@ async def profile() -> typing.Union[str, quart.Response]: mimetype = file_info.mimetype data = file_info.stream.read() if len(data) > max_avatar_size: - print(len(data), max_avatar_size) form.avatar.errors.append(EAVATARTOOBIG) ok = False elif len(data) > 0: