From b418dba7aea1d42d9964a3a3db81d0e675c8fa9a Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 5 Feb 2024 18:49:59 +0530 Subject: [PATCH] ci: migrate from isort to ruff --- .pre-commit-config.yaml | 10 +++++----- pyproject.toml | 9 --------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5966e49615..1e9e2adb90 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,12 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.2.0 hooks: + - id: ruff + name: "Sort Python imports" + args: ["--select", "I", "--fix"] + - id: ruff-format + name: "Format Python code" - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.7.1 @@ -67,11 +72,6 @@ repos: frappe/public/js/lib/.* )$ - - repo: https://github.com/PyCQA/isort - rev: 5.12.0 - hooks: - - id: isort - - repo: https://github.com/PyCQA/flake8 rev: 6.0.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index 53dc55580e..49ef211838 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,15 +95,6 @@ line-length = 110 indent-style = "tab" docstring-code-format = true -[tool.isort] -line_length = 110 -multi_line_output = 3 -include_trailing_comma = true -force_grid_wrap = 0 -use_parentheses = true -ensure_newline_before_comments = true -indent = "\t" - [tool.bench.dev-dependencies] coverage = "~=6.5.0" Faker = "~=18.10.1"