-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
43 lines (40 loc) · 1.2 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
repos:
# Add some general purpose useful hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
# Make sure that contained YAML files are well-formed
- id: check-yaml
# Trim trailing whitespace of all sorts
- id: trailing-whitespace
# Apply a file size limit of 500kB
- id: check-added-large-files
# Simple parser validation of e.g. pyproject.toml
- id: check-toml
# Unify file endings
- id: end-of-file-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix]
- id: ruff-format
types_or: [python, pyi, jupyter]
# Make sure that Jupyter notebooks under version control
# have their outputs stripped before committing
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
files: ".ipynb"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: [numpy, PyQt5-stubs]
args:
[
--ignore-missing-imports,
--warn-redundant-casts,
]