Skip to content

CI/STYLE: run black before ruff in pre-commit #51416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down