build: switch pre-commit completely to nox

This commit is contained in:
Anand Balakrishnan 2023-09-06 11:44:54 -07:00
parent deedac2a2e
commit 97e90271c4
No known key found for this signature in database
2 changed files with 57 additions and 60 deletions

View file

@ -8,60 +8,9 @@ repos:
- id: check-added-large-files
- repo: local
hooks:
- id: fmt
name: cargo fmt
description: Format files with cargo fmt.
entry: cargo +nightly fmt
- id: nox
name: nox
description: Run nox fixers and linters.
entry: nox -t fix style lint
language: system
types: [rust]
args: ["--"]
- id: cargo-check
name: cargo check
description: Check the package for errors.
entry: cargo check
language: system
args: ["--workspace"]
types: [rust]
pass_filenames: false
- id: clippy
name: clippy
description: Lint rust sources
entry: cargo clippy
language: system
args: ["--workspace", "--", "-D", "warnings"]
types: [rust]
pass_filenames: false
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (pyi)
types: [pyi]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.287
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
types_or: [python, pyi]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.5.1'
hooks:
- id: mypy
additional_dependencies:
- "typing-extensions>=4.0.0"
- repo: https://github.com/pycqa/flake8
rev: '6.1.0'
hooks:
- id: flake8
additional_dependencies:
- "Flake8-pyproject"
- "flake8-bugbear"
- "flake8-pyi"
args: ["--toml-config", "pyargus/pyproject.toml"]