-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
83 lines (77 loc) · 2.51 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
ci:
autoupdate_schedule: monthly
autofix_commit_msg: "style(pre-commit.ci): auto fixes [...]"
autoupdate_commit_msg: "ci(pre-commit.ci): autoupdate"
repos:
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
hooks:
- id: validate-pyproject
- repo: https://github.com/crate-ci/typos
rev: dictgen-v0.3.1
hooks:
- id: typos
args: [--force-exclude] # omitting --write-changes
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
hooks:
- id: markdownlint
args: [
--disable=MD033, # no-inline-html
]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
hooks:
- id: ruff
args: [--fix, --unsafe-fixes]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
files: "^src/"
# The dependencies are listed here in a somewhat unusual way...
# pre-commit.ci has a strict limit of 250MB for the entire environment
# which is much smaller than all of the transitive dependencies of this repo
# so we use --no-deps, and then add just enough to make sure we cover all of
# our typing use cases. Note also the custom PyQt6-stubs repo.
additional_dependencies:
- "--no-deps"
# required for mypy
- mypy
- typing_extensions
- mypy_extensions
# required for mypy to find the installed packages
- cmap
- git+https://github.com/tlambert03/[email protected]
- iconify
- ipykernel
- ipython
- ndv
- pydantic
- pydantic_core
- pymmcore
- pymmcore-plus
- pymmcore-widgets
- pyyaml
- qtconsole
- rich
- superqt
- tifffile
- tqdm
- traitlets
- types-Pygments
- types-PyYAML
- zarr<3.0
# as an alternative to that annoying list of packages,
# pyright can use a virtual environment to find the installed packages
# here we direct it to look in the current directory for a .venv folder
# however, this won't work for pre-commit.ci (because of environment creation limits)
# so we use stages: [manual], and run it manually in ci.yml
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.392.post0
hooks:
- id: pyright
files: "^src/"
args: [--venvpath, "."]
stages: [manual]