From 2cdbf54e8d317564dc86e1f34e03ea698db86e97 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 5 Feb 2024 18:17:48 +0530 Subject: [PATCH] ci: migrate from forked `black` to `ruff-format` --- .pre-commit-config.yaml | 6 +++--- pyproject.toml | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7161bb90ae..5966e49615 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,10 +26,10 @@ repos: - id: pyupgrade args: ['--py310-plus'] - - repo: https://github.com/frappe/black - rev: 951ccf4d5bb0d692b457a5ebc4215d755618eb68 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.2.0 hooks: - - id: black + - id: ruff-format - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.7.1 diff --git a/pyproject.toml b/pyproject.toml index 1bd9439dc0..53dc55580e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,11 +88,15 @@ dependencies = [ requires = ["flit_core >=3.4,<4"] build-backend = "flit_core.buildapi" -[tool.black] -line-length = 99 +[tool.ruff] +line-length = 110 + +[tool.ruff.format] +indent-style = "tab" +docstring-code-format = true [tool.isort] -line_length = 99 +line_length = 110 multi_line_output = 3 include_trailing_comma = true force_grid_wrap = 0