-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
40 lines (36 loc) · 1.32 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
40 lines (36 loc) · 1.32 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
# Scope to the package, matching the CI lint job (`mypy groupoid/`). The
# tests are not type-annotated to the package's standard, and numpy-stub
# inference on test helpers (e.g. matmul of rotation matrices) is noisy.
files: ^groupoid/
# Pin numpy to the project's supported range so the hook type-checks
# against the same stubs as runtime/CI. Unbounded numpy>=1.24 resolves to
# numpy 2.x, whose stubs type e.g. np.linalg.inv as floating[Any] and
# disagree with the project's numpy<2.0 (pinned for geomstats).
additional_dependencies: ["pydantic>=2.0", "numpy>=1.24,<2.0"]
args: [--ignore-missing-imports]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.7
hooks:
- id: bandit
args: [-c, pyproject.toml]
additional_dependencies: ["bandit[toml]"]