-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
89 lines (87 loc) · 3.04 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
89 lines (87 loc) · 3.04 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
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
84
85
86
87
88
89
ci:
autofix_prs: true
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autoupdate_branch: ""
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: monthly
skip: []
submodules: false
fail_fast: false
default_language_version:
python: python3
default_stages:
- pre-commit
- pre-push
minimum_pre_commit_version: 2.16.0
# Never reformat vendored binaries, bundled package data, test reference
# fixtures, or the auto-generated CI report — these are content/data whose
# exact bytes matter (CRLF in .pdb fixtures, exact-match test inputs, ...).
exclude: |
(?x)^(
gget/bins/
| gget/constants/
| tests/fixtures/
| tests/pytest_results.*\.txt
| \.github/badges/.*\.json
| \.mypy-baseline\.txt
)
repos:
- repo: https://github.com/biomejs/pre-commit
rev: v2.4.16
hooks:
- id: biome-format
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.23.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.15
hooks:
- id: ruff-check
types_or: [python, pyi, jupyter]
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
types_or: [python, pyi, jupyter]
# mypy is run through mypy-baseline: the ~550 pre-existing type errors are
# grandfathered in .mypy-baseline.txt, so this hook only fails on NEW type
# errors introduced by a change. Works on pre-commit.ci (which runs
# --all-files) because the baseline filters by error identity, not by file.
# To refresh the baseline after fixing errors:
# mypy gget | mypy-baseline sync
# See https://github.com/scverse/gget/issues/216
- repo: local
hooks:
- id: mypy-baseline
name: mypy (new errors only, baseline-filtered)
entry: bash -c 'mypy gget | mypy-baseline filter'
language: python
pass_filenames: false
always_run: true
# Pin everything that affects mypy's output so the baseline stays
# reproducible across machines and pre-commit.ci (unpinned stubs drift
# and surface "new" errors that aren't real). Bump deliberately and
# re-sync the baseline when you do.
additional_dependencies:
- mypy==1.13.0
- mypy-baseline==0.7.4
- pandas-stubs==3.0.3.260530
- types-requests==2.33.0.20260518
- types-tqdm==4.68.0.20260608
- types-beautifulsoup4==4.12.0.20250516
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: detect-private-key
- id: check-ast
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
# Preserve Markdown hard line breaks (trailing double-space) in docs.
args: [--markdown-linebreak-ext=md]
- id: check-case-conflict
# Check that there are no merge conflicts (could be generated by template sync)
- id: check-merge-conflict
args: [--assume-in-merge]