From e5cdd6c044c079a4d8c59b73755c00ace97a2325 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Sat, 4 Nov 2023 13:25:05 +0100 Subject: [PATCH] Switch to ruff's formatter and import sorting --- .github/workflows/ci.yml | 1 - pyproject.toml | 16 ++++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb4154b..92dc81f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,7 +72,6 @@ jobs: - name: Check formatting if: always() run: | - hatch run style:format git diff --color --exit-code - name: Check types if: always() diff --git a/pyproject.toml b/pyproject.toml index 9cdce31..b5be155 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,8 +80,6 @@ check = [ skip-install = true dependencies = [ "ruff", - "isort", - "black", ] [tool.hatch.envs.style.scripts] fix = [ @@ -89,8 +87,7 @@ fix = [ "format", ] format = [ - "isort -q mkdocs_gen_files tests", - "black -q mkdocs_gen_files tests", + "ruff format -q mkdocs_gen_files tests", ] [tool.hatch.envs.docs] @@ -104,15 +101,10 @@ dependencies = [ "pymdown-extensions >=9.0", ] -[tool.black] -line-length = 100 - -[tool.isort] -profile = "black" -line_length = 100 - [tool.ruff] +line-length = 100 select = [ + "I", "F", "W", "E", "UP", "YTT", "C4", "DTZ", "FA", "ISC", "PIE", "T20", "RSE", "TCH", "B002", "B003", "B005", "B007", "B009", "B012", "B013", "B014", "B015", "B018", "B020", "B021", "B023", "B026", "B033", "B034", "B905", "COM818", @@ -129,7 +121,7 @@ allow-dict-calls-with-keyword-arguments = true [tool.mypy] warn_unreachable = true -show_error_codes = true +allow_redefinition = true [tool.pytest.ini_options] addopts = "--tb=native"