-
Notifications
You must be signed in to change notification settings - Fork 507
/
.pre-commit-config.yaml
44 lines (40 loc) · 1.08 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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]