From d0b453cbaf405e60d49be4eb48ba7c05498d2e45 Mon Sep 17 00:00:00 2001 From: Davor Runje Date: Sun, 31 Mar 2024 21:07:46 +0000 Subject: [PATCH] replace unofficial with official pre-commit hook for ruff --- .pre-commit-config.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 025cc7cbb17..53b6207a301 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,11 +26,12 @@ repos: rev: 24.3.0 hooks: - id: black - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.3.3 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.3.4 hooks: - id: ruff - args: ["--fix"] + types_or: [ python, pyi, jupyter ] + args: ["--fix", "--ignore=E402"] - repo: https://github.com/codespell-project/codespell rev: v2.2.6 hooks: @@ -61,9 +62,6 @@ repos: # Print the number of files as a sanity-check verbose: true - repo: https://github.com/nbQA-dev/nbQA - rev: 1.8.4 + rev: 1.8.5 hooks: - - id: nbqa-ruff - # Don't require notebooks to have all imports at the top - args: ["--fix", "--ignore=E402"] - id: nbqa-black