From 07726f6125cbfe073bc67df05e851ead191332c8 Mon Sep 17 00:00:00 2001 From: monosans Date: Wed, 25 Oct 2023 09:41:55 +0300 Subject: [PATCH] Replace black with ruff-format --- .pre-commit-config.yaml | 5 +---- pyproject.toml | 15 +++++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4d73c04..3d4ef5b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,16 +20,13 @@ repos: rev: v3.0.3 hooks: - id: prettier - - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.10.1 - hooks: - - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit rev: v0.1.2 hooks: - id: ruff args: - --fix + - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.6.1 hooks: diff --git a/pyproject.toml b/pyproject.toml index 4550bc5..71e081a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,3 @@ -[tool.black] -line-length = 80 -target-version = ["py37"] -skip-magic-trailing-comma = true -preview = true - [tool.mypy] python_version = "3.8" disallow_subclassing_any = false @@ -32,6 +26,7 @@ ignore = [ "BLE001", "C901", "COM", + "CPY001", "D100", "D101", "D102", @@ -50,14 +45,17 @@ ignore = [ "D415", "D417", "DJ008", + "E203", "ERA001", "FBT002", "PD901", "PERF203", + "PLR0904", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "PLR0916", "PT012", "RUF001", "RUF002", @@ -77,6 +75,7 @@ ignore = [ ] ignore-init-module-imports = true line-length = 80 +preview = true select = ["ALL"] target-version = "py37" @@ -86,6 +85,10 @@ ignore-names = [] [tool.ruff.flake8-unused-arguments] ignore-variadic-names = true +[tool.ruff.format] +line-ending = "lf" +skip-magic-trailing-comma = true + [tool.ruff.isort] combine-as-imports = true required-imports = ["from __future__ import annotations"]