From b40123d7933f3d6bf03d465cf6321bec68bfc525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Zar=C4=99bski?= Date: Fri, 7 Jun 2024 09:43:45 +0100 Subject: [PATCH] [skip ci] Added T201 to Ruff (no print statements) --- pyproject.toml | 7 ++++++- simvue/factory/proxy/remote.py | 1 - simvue/metadata.py | 7 ------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aee53130..15b7a86c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,9 +89,14 @@ priority = "primary" [tool.ruff] -lint.extend-select = ["C901"] +lint.extend-select = ["C901", "T201"] lint.mccabe.max-complexity = 11 +[tool.ruff.lint.per-file-ignores] +"tests/*" = ["T201"] +"examples/*" = ["T201"] +"notebooks/*" = ["T201"] + [tool.pytest.ini_options] addopts = "-p no:warnings --cov=simvue -n auto" testpaths = [ diff --git a/simvue/factory/proxy/remote.py b/simvue/factory/proxy/remote.py index 612b4a09..888d6054 100644 --- a/simvue/factory/proxy/remote.py +++ b/simvue/factory/proxy/remote.py @@ -370,7 +370,6 @@ def list_alerts(self) -> list[dict[str, typing.Any]]: if not (response_data := response.json()) or ( (data := response_data.get("data")) is None ): - print(response_data) self._error( "Expected key 'alerts' in response from server during alert retrieval" ) diff --git a/simvue/metadata.py b/simvue/metadata.py index 5d8540a0..3f262972 100644 --- a/simvue/metadata.py +++ b/simvue/metadata.py @@ -65,10 +65,3 @@ def git_info(repository: str) -> dict[str, typing.Any]: "git.url": git_repo.remote().url, "git.dirty": dirty, } - - -if __name__ in "__main__": - import os.path - import json - - print(json.dumps(git_info(os.path.dirname(__file__)), indent=2))