From 1a73aa4e6d64c6f3ecc9a71906e9ff062389450d Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Wed, 15 Feb 2023 21:37:27 +0100 Subject: [PATCH] CI/STYLE: run black before ruff in pre-commit --- .pre-commit-config.yaml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2f13ac4c73fa0..caafce376771d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,6 +15,18 @@ default_stages: [ ci: autofix_prs: false repos: +- repo: local + hooks: + # NOTE: we make `black` a local hook because if it's installed from + # PyPI (rather than from source) then it'll run twice as fast thanks to mypyc + - id: black + name: black + description: "Black: The uncompromising Python code formatter" + entry: black + language: python + require_serial: true + types_or: [python, pyi] + additional_dependencies: [black==23.1.0] - repo: https://github.com/charliermarsh/ruff-pre-commit rev: v0.0.244 hooks: @@ -116,16 +128,6 @@ repos: - id: sphinx-lint - repo: local hooks: - # NOTE: we make `black` a local hook because if it's installed from - # PyPI (rather than from source) then it'll run twice as fast thanks to mypyc - - id: black - name: black - description: "Black: The uncompromising Python code formatter" - entry: black - language: python - require_serial: true - types_or: [python, pyi] - additional_dependencies: [black==23.1.0] - id: pyright # note: assumes python env is setup and activated name: pyright