From 0d42b53d342dee32c184510eefefb383f8fb88c1 Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Mon, 13 Nov 2023 10:44:05 +0100 Subject: [PATCH] Use ruff as the code formatter --- .pre-commit-config.yaml | 11 ++--------- pyproject.toml | 1 + requirements-test.txt | 1 - tox.ini | 2 +- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 03e66d1..bc38838 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,18 +1,11 @@ repos: - - repo: https://github.com/charliermarsh/ruff-pre-commit + - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.1.5 hooks: - id: ruff args: - --fix - - repo: https://github.com/psf/black - rev: 23.11.0 - hooks: - - id: black - args: - - --safe - - --quiet - files: ^((gios|tests)/.+)?[^/]+\.py$ + - id: ruff-format - repo: https://github.com/codespell-project/codespell rev: v2.2.6 hooks: diff --git a/pyproject.toml b/pyproject.toml index f234765..cde0939 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,6 +77,7 @@ ignore = [ "D407", # Section name underlining "D411", # Missing blank line before section "E731", # Do not assign a lambda expression, use a def + "ISC001", # Single line implicit string concatenation "PLR0912", # Too many branches "PLR0915", # Too many statements "PT023", # Use `@pytest.mark.asyncio()` over `@pytest.mark.asyncio` diff --git a/requirements-test.txt b/requirements-test.txt index bbda8a6..fc3e987 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,5 +1,4 @@ aioresponses==0.7.4 -black==23.10.1 coverage==7.3.2 mypy==1.6.1 pytest-asyncio==0.21.1 diff --git a/tox.ini b/tox.ini index 3bd8530..530d67b 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ basepython = python3 ignore_errors = True commands = ruff check . - black --check . + ruff format --check . deps = -rrequirements.txt -rrequirements-test.txt