From 270dc6f71d7334270364766c3cb1a07b62b68293 Mon Sep 17 00:00:00 2001 From: Johannes Nussbaum <39048939+jnussbaum@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:34:04 +0200 Subject: [PATCH] chore(ci): fix ruff format checking (#915) --- .github/workflows/tests-on-push.yml | 4 ++-- pyproject.toml | 2 +- src/dsp_tools/commands/excel2xml/excel2xml_cli.py | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests-on-push.yml b/.github/workflows/tests-on-push.yml index 5a1ba3e77..2ed1fd2ff 100644 --- a/.github/workflows/tests-on-push.yml +++ b/.github/workflows/tests-on-push.yml @@ -38,8 +38,8 @@ jobs: uses: ./.github/actions/setup - name: Linting with ruff run: poetry exec ruff-check-github - - name: Formatting with ruff - run: poetry exec ruff-format + - name: Check formatting with ruff + run: poetry exec ruff-format-check - name: Linting with mypy run: poetry exec mypy - name: Linting with darglint diff --git a/pyproject.toml b/pyproject.toml index cd8d9e25f..867aeff3e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,7 +98,7 @@ ruff-check = "ruff check . --ignore=A002,D101,D102,PLR0913,PLR2004,PLW0603" ruff-check-github = """ ruff check . --output-format=github --ignore=A002,D101,D102,PLR0913,PLR2004,PLW0603 """ -ruff-format = "ruff format ." +ruff-format-check = "ruff format --check ." mypy = "mypy ." unittests = "pytest test/unittests/" integration-tests = "pytest test/integration/" diff --git a/src/dsp_tools/commands/excel2xml/excel2xml_cli.py b/src/dsp_tools/commands/excel2xml/excel2xml_cli.py index 16c204ecf..53d9eca65 100644 --- a/src/dsp_tools/commands/excel2xml/excel2xml_cli.py +++ b/src/dsp_tools/commands/excel2xml/excel2xml_cli.py @@ -524,12 +524,10 @@ def excel2xml( print(f"WARNING: {warning.message}") if success: - print(f"XML file successfully written to '{output_file!s}'") + print(f"XML file successfully written to '{output_file}'") else: red = "\033[31m" end = "\033[0m" - print( - f"{red}Some problems occurred. The XML file was written to '{output_file!s}', but it might be corrupt{end}" - ) + print(f"{red}Some problems occurred. The XML file was written to '{output_file}', but it might be corrupt{end}") return success, catched_warnings