From 07cc5337f0d9e11280066a909a4de54abd530d7d Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Fri, 28 Jul 2023 18:09:13 -0400 Subject: [PATCH] chore: adds flake8-print plugin to find unintentional print statements Signed-off-by: Jennifer Power --- .flake8 | 3 ++- poetry.lock | 17 ++++++++++++++++- pyproject.toml | 1 + trestlebot/cli.py | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.flake8 b/.flake8 index 0438b81d..46603647 100644 --- a/.flake8 +++ b/.flake8 @@ -1,2 +1,3 @@ [flake8] -max-line-length=105 \ No newline at end of file +max-line-length=105 +exclude=.venv* \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index c8ba7dff..85dd0878 100644 --- a/poetry.lock +++ b/poetry.lock @@ -719,6 +719,21 @@ mccabe = ">=0.7.0,<0.8.0" pycodestyle = ">=2.10.0,<2.11.0" pyflakes = ">=3.0.0,<3.1.0" +[[package]] +name = "flake8-print" +version = "5.0.0" +description = "print statement checker plugin for flake8" +optional = false +python-versions = ">=3.7" +files = [ + {file = "flake8-print-5.0.0.tar.gz", hash = "sha256:76915a2a389cc1c0879636c219eb909c38501d3a43cc8dae542081c9ba48bdf9"}, + {file = "flake8_print-5.0.0-py3-none-any.whl", hash = "sha256:84a1a6ea10d7056b804221ac5e62b1cee1aefc897ce16f2e5c42d3046068f5d8"}, +] + +[package.dependencies] +flake8 = ">=3.0" +pycodestyle = "*" + [[package]] name = "furl" version = "2.1.3" @@ -2143,4 +2158,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.8.1" -content-hash = "0094663e0d12e460a4dceb092735734606ca22bb3f7ccea65527275bea5a24b7" +content-hash = "e4421783726e2c16fa65098b19709d0ae51e3887b99304be381c9fb15f446593" diff --git a/pyproject.toml b/pyproject.toml index 81ce805f..8073ba18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,7 @@ mypy = "^1.3.0" isort = "^5.12.0" safety = "^2.3.5" bandit = "^1.7.5" +flake8-print = "^5.0.0" [tool.poetry.group.tests.dependencies] pytest = "^7.3.2" diff --git a/trestlebot/cli.py b/trestlebot/cli.py index 36b3b5b8..327720d0 100644 --- a/trestlebot/cli.py +++ b/trestlebot/cli.py @@ -272,7 +272,7 @@ def run() -> None: # Print the full commit sha if commit_sha: - print(f"Commit Hash: {commit_sha}") + print(f"Commit Hash: {commit_sha}") # noqa except Exception as e: exit_code = handle_exception(e)