-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unify local and pre-commit ruff configuration
- Loading branch information
1 parent
e799f5a
commit 0907f4c
Showing
12 changed files
with
197 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,34 @@ | ||
default_stages: [pre-commit] # don't run on push by default | ||
repos: | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.5.5 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
types_or: [python, pyi, jupyter] | ||
- id: ruff-format | ||
- repo: local | ||
hooks: | ||
- id: docs-mdx-format | ||
name: Format Docs | ||
language: system | ||
entry: bash -c "cd docs && make mdx-format" | ||
pass_filenames: false | ||
files: ^docs/content | ||
- repo: local | ||
hooks: | ||
- id: ruff-format | ||
name: Ruff Format | ||
entry: ruff | ||
args: [format] | ||
language: system | ||
pass_filenames: false | ||
- id: ruff-lint | ||
name: Ruff Line | ||
entry: ruff | ||
args: [check, --fix, --exit-non-zero-on-fix] | ||
language: system | ||
pass_filenames: false | ||
- id: docs-mdx-format | ||
name: Format Docs | ||
language: system | ||
entry: bash -c "cd docs && make mdx-format" | ||
pass_filenames: false | ||
files: ^docs/content | ||
|
||
# We do not use pyright's provided pre-commit hook because we need the environment management | ||
# supplied by `scripts/run-pyright.py`. | ||
- id: pyright | ||
name: pyright | ||
entry: make quick_pyright | ||
stages: [pre-push] | ||
# This means pre-commit will not try to install a new environment for this hook. It relies on | ||
# having a pre-existing `make` installed (and scripts/run-pyright.py). | ||
language: system | ||
pass_filenames: false | ||
types: [python] | ||
# We do not use pyright's provided pre-commit hook because we need the environment management | ||
# supplied by `scripts/run-pyright.py`. | ||
- id: pyright | ||
name: pyright | ||
entry: make quick_pyright | ||
stages: [pre-push] | ||
# This means pre-commit will not try to install a new environment for this hook. It relies on | ||
# having a pre-existing `make` installed (and scripts/run-pyright.py). | ||
language: system | ||
pass_filenames: false | ||
types: [python] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.