Skip to content

Commit

Permalink
Update pre-commit hooks and make them fail fast (python-graphblas#294)
Browse files Browse the repository at this point in the history
Also, add hook to ensure we don't accidentally commit to main branch
  • Loading branch information
eriknw authored Oct 20, 2022
1 parent cb90213 commit d0c41f2
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
#
# Before first use: `pre-commit install`
# To run: `pre-commit run --all-files`
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/myint/autoflake
rev: v1.4
rev: v1.7.6
hooks:
- id: autoflake
args: [--in-place]
Expand All @@ -23,7 +26,7 @@ repos:
- id: isort
language_version: python3
- repo: https://github.com/asottile/pyupgrade
rev: v2.34.0
rev: v3.1.0
hooks:
- id: pyupgrade
args: [--py38-plus]
Expand All @@ -32,29 +35,33 @@ repos:
hooks:
- id: auto-walrus
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 22.10.0
hooks:
- id: black
language_version: python3
args: [--target-version=py38]
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: &flake8_dependencies
- flake8==4.0.1
- flake8-comprehensions==3.8.0
- flake8-bugbear==22.3.23
- flake8==5.0.4
- flake8-comprehensions==3.10.0
- flake8-bugbear==22.9.23
- repo: https://github.com/asottile/yesqa
rev: v1.3.0
rev: v1.4.0
hooks:
- id: yesqa
additional_dependencies: *flake8_dependencies
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
rev: v2.2.0
hooks:
- id: codespell
types_or: [python, rst, markdown]
files: ^(graphblas|docs)/
args: ["--ignore-words-list=coo,ba"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: no-commit-to-branch # no commit directly to main
# Maybe: black-jupyter, blacken-docs, blackdoc mypy, velin

0 comments on commit d0c41f2

Please sign in to comment.