forked from scikit-learn/scikit-learn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
56 lines (55 loc) · 2.2 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
56 lines (55 loc) · 2.2 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
exclude: '^(.git/|sklearn/externals/|asv_benchmarks/env/)'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# WARNING if you update ruff version here, remember to update
# sklearn/_min_dependencies.py and doc .rst files mentioning ruff==<version>
rev: v0.12.2
hooks:
- id: ruff-check
args: ["--fix", "--output-format=full"]
- id: ruff-format
- repo: https://github.com/facebook/pyrefly-pre-commit
# NOTE if you update the pyrefly version here, remember to update
# sklearn/_min_dependencies.py as well. This is the pyrefly version used
# for type checking (not a separate pre-commit hook version).
rev: 1.2.0
hooks:
- id: pyrefly-check
name: Pyrefly (type checking)
# We set `pytest` to an arbitrary recent version to keep it consistent with the
# linting settings in `build_tools/update_environments_and_lock_files.py`. They
# should be updated from time to time in both places.
additional_dependencies: [pytest==9.1.0]
- repo: https://github.com/MarcoGorelli/cython-lint
# NOTE if you update the cython-lint version here, remember to update
# sklearn/_min_dependencies.py as well
rev: v0.21.0
hooks:
# TODO: add the double-quote-cython-strings hook when it's usability has improved:
# possibility to pass a directory and use it as a check instead of auto-formatter.
- id: cython-lint
args: [--ban-relative-imports]
- repo: https://github.com/sphinx-contrib/sphinx-lint
# NOTE if you update the sphinx-lint version here, remember to update
# sklearn/_min_dependencies.py as well
rev: v1.0.2
hooks:
- id: sphinx-lint
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
files: ^doc/css/styles/|^doc/js/scripts/
exclude: ^doc/js/scripts/vendor/
types_or: ["css", "javascript"]
- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in pyproject.toml
rev: v2.4.1
hooks:
- id: codespell