From 3b3a3201253b2003a7a9ec2146e56b1d153fa562 Mon Sep 17 00:00:00 2001 From: Andy Mikhaylenko Date: Sun, 16 Jun 2024 22:45:33 +0200 Subject: [PATCH] =?UTF-8?q?lint:=20replace=20Black=20&=20C=C2=B0=20with=20?= =?UTF-8?q?Ruff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 19 ++++--------------- tests/test_integration.py | 12 ++++-------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7cf4098..4e4c6bc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,22 +14,11 @@ repos: - id: check-yaml files: .*\.(yaml|yml)$ - - repo: https://github.com/pycqa/isort - rev: 5.12.0 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.4.9 hooks: - - id: isort - name: isort - - - repo: https://github.com/psf/black - rev: 23.9.1 - hooks: - - id: black - language_version: python3 - - - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 - hooks: - - id: flake8 + - id: ruff + - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.5.1 diff --git a/tests/test_integration.py b/tests/test_integration.py index 258a148..7764160 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -742,8 +742,7 @@ def remind( else: assert "-t, --task TASK 'hang the Moose'" in help_normalised assert ( - "-r, --reason REASON 'there are creatures living in it'" - in help_normalised + "-r, --reason REASON 'there are creatures living in it'" in help_normalised ) # explicit help message is not obscured by the implicit one @@ -900,8 +899,7 @@ def second_func(): ) else: arg_help_lines = ( - " -h, --help show this help message and exit\n" - " -f, --foo FOO 123" + " -h, --help show this help message and exit\n" " -f, --foo FOO 123" ) assert ( @@ -1041,8 +1039,7 @@ def second_func(): ) else: arg_help_lines = ( - " -h, --help show this help message and exit\n" - " -f, --foo FOO 123" + " -h, --help show this help message and exit\n" " -f, --foo FOO 123" ) assert ( @@ -1135,8 +1132,7 @@ def second_func(): ) else: arg_help_lines = ( - " -h, --help show this help message and exit\n" - " -f, --foo FOO 123" + " -h, --help show this help message and exit\n" " -f, --foo FOO 123" ) assert (