forked from DOI-USGS/dataretrieval-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
48 lines (44 loc) · 1.6 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
48 lines (44 loc) · 1.6 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
ci:
autoupdate_schedule: monthly
autofix_prs: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# tests/data/ holds byte-exact API response captures (TSV/RDB with
# significant trailing tabs, plus pinned JSON). Skip whitespace and
# EOL normalization there so we don't silently change fixture bytes.
- id: trailing-whitespace
exclude: ^tests/data/
- id: end-of-file-fixer
exclude: ^tests/data/
- id: mixed-line-ending
exclude: ^tests/data/
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.15
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
# Type-check with mypy --strict (config lives in pyproject [tool.mypy]).
# Pinned to the same major as CI's `mypy<2`. httpx/anyio are installed into
# the isolated hook env so their types resolve — without them mypy falls back
# to `Any` and mis-reports (the runtime deps aren't in the hook's venv).
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.20.2
hooks:
- id: mypy
pass_filenames: false
additional_dependencies: [httpx, anyio]
# Strip cell outputs + execution_count from notebooks on commit so the
# diff is the source, not the rendered run. Demos still execute fine
# locally; clean commits keep PRs reviewable and avoid quota/timestamp
# churn on every re-run.
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout