You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
be-lcca/.pre-commit-config.yaml

45 lines
1.1 KiB
YAML

# Quick Start:
#
# pip install pre-commit
# pre-commit install && pre-commit install -t pre-push
# pre-commit run --all-files
#
# To Skip Checks:
#
# git commit --no-verify
fail_fast: false
default_language_version:
python: python3.11.2
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# ruff version.
rev: v0.7.0
hooks:
# Run the linter.
#
# When running with --fix, Ruff's lint hook should be placed before Ruff's formatter hook,
# and before Black, isort, and other formatting tools, as Ruff's fix behavior can output code changes that require reformatting.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
# Typos
- repo: https://github.com/crate-ci/typos
rev: v1.26.1
hooks:
- id: typos
exclude: ^(data/dispatch-sample-data.dump|src/dispatch/static/dispatch/src/|src/dispatch/database/revisions/)
# Pytest
- repo: local
hooks:
- id: tests
name: run tests
entry: pytest -v tests/
language: system
types: [python]
stages: [push]