From 8dc7e92ddb8d5182444502c42a5a21145abef6b5 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 31 Oct 2023 19:39:43 -0400 Subject: [PATCH] move to ruff and ruff formatter --- .pre-commit-config.yaml | 13 +++++-------- pyproject.toml | 5 +++++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index af359fb..dbb767a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,12 +13,9 @@ repos: - id: check-symlinks - id: check-toml # Python -- repo: https://github.com/psf/black - rev: 23.10.0 +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.3 hooks: - - id: black-jupyter -- repo: https://github.com/PyCQA/isort - rev: 5.12.0 - hooks: - - id: isort - files: \.py$ + - id: ruff + args: ["--fix"] + - id: ruff-format diff --git a/pyproject.toml b/pyproject.toml index 77239c2..bf767a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,3 +41,8 @@ deepmodeling_sphinx = [ [tool.isort] profile = "black" + +[tool.ruff] +select = [ + "I", # isort +]