-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
50 lines (46 loc) · 1.58 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
50 lines (46 loc) · 1.58 KB
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
45
46
47
48
49
50
# Pre-commit hooks for vstack. Install with:
#
# pre-commit install
#
# Then every `git commit` runs ruff (lint + format) + mypy + bandit + pip-audit
# against the staged files only. Manual full-repo run:
#
# pre-commit run --all-files
#
# The hooks mirror what CI runs, so passing locally = green PR.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
args: [--maxkb=512]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
- id: ruff
args: [--fix]
files: ^(module-1-individual|module-2-team|module-3-organization)/
- id: ruff-format
files: ^(module-1-individual|module-2-team|module-3-organization)/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
# mypy needs the package installed; the hook installs additional
# dependencies into its own venv.
additional_dependencies: [pydantic>=2.6.0]
args: [--strict, --ignore-missing-imports]
files: ^(module-1-individual|module-2-team|module-3-organization)/.*/lib/.*\.py$
- repo: https://github.com/PyCQA/bandit
rev: 1.7.10
hooks:
- id: bandit
# Library code only — fixture-heavy demos and tests trip rules that
# do not represent real risk.
args: [-ll, -ii]
files: ^(module-1-individual|module-2-team|module-3-organization)/.*/lib/.*\.py$