@@ -6,81 +6,40 @@ default_stages:
6
6
- push
7
7
minimum_pre_commit_version : 2.16.0
8
8
repos :
9
- - repo : https://github.com/psf/black
10
- rev : 24.1.1
11
- hooks :
12
- - id : black
13
- - repo : https://github.com/nbQA-dev/nbQA
14
- rev : 1.7.1
15
- hooks :
16
- - id : nbqa-pyupgrade
17
- args : [--py38-plus]
18
- - id : nbqa-black
19
- - id : nbqa-isort
20
- - id : nbqa-ruff
21
- args : [--fix]
22
- - id : nbqa
23
- entry : nbqa blacken-docs
24
- name : nbqa-blacken-docs
25
- alias : nbqa-blacken-docs
26
- additional_dependencies : [blacken-docs]
27
- args : [--nbqa-md]
28
- - id : nbqa
29
- entry : nbqa mdformat
30
- name : nbqa-mdformat
31
- alias : nbqa-mdformat
32
- additional_dependencies :
33
- [
34
- mdformat,
35
- mdformat-black,
36
- mdformat-frontmatter,
37
- mdformat-web,
38
- mdformat-myst,
39
- ]
40
- args : [--nbqa-md]
41
9
- repo : https://github.com/pre-commit/mirrors-prettier
42
- rev : v4.0.0-alpha.8
10
+ rev : v3.1.0
43
11
hooks :
44
12
- id : prettier
45
- - repo : https://github.com/asottile/blacken-docs
46
- rev : 1.16.0
47
- hooks :
48
- - id : blacken-docs
49
- - repo : https://github.com/PyCQA/isort
50
- rev : 5.13.2
51
- hooks :
52
- - id : isort
53
- - repo : https://github.com/asottile/yesqa
54
- rev : v1.5.0
55
- hooks :
56
- - id : yesqa
57
- additional_dependencies :
58
- - flake8-tidy-imports
59
- - flake8-docstrings
60
- - flake8-rst-docstrings
61
- - flake8-comprehensions
62
- - flake8-bugbear
63
- - flake8-blind-except
13
+ # Newer versions of node don't work on systems that have an older version of GLIBC
14
+ # (in particular Ubuntu 18.04 and Centos 7)
15
+ # EOL of Centos 7 is in 2024-06, we can probably get rid of this then.
16
+ # See https://github.com/scverse/cookiecutter-scverse/issues/143 and
17
+ # https://github.com/jupyterlab/jupyterlab/issues/12675
18
+ language_version : " 17.9.1"
19
+ - repo : https://github.com/astral-sh/ruff-pre-commit
20
+ rev : v0.1.11
21
+ hooks :
22
+ - id : ruff
23
+ args : [--fix, --exit-non-zero-on-fix]
24
+ types_or : [python, pyi, jupyter]
25
+ - id : ruff-format
26
+ types_or : [python, pyi, jupyter]
64
27
- repo : https://github.com/pre-commit/pre-commit-hooks
65
28
rev : v4.5.0
66
29
hooks :
67
30
- id : detect-private-key
68
31
- id : check-ast
32
+ - id : end-of-file-fixer
69
33
- id : mixed-line-ending
70
34
args : [--fix=lf]
71
35
- id : trailing-whitespace
72
36
- id : check-case-conflict
73
- - repo : https://github.com/PyCQA/autoflake
74
- rev : v2.2.1
75
- hooks :
76
- - id : autoflake
77
- args :
78
- - --in-place
79
- - --remove-all-unused-imports
80
- - --remove-unused-variable
81
- - --ignore-init-module-imports
82
- - repo : https://github.com/asottile/pyupgrade
83
- rev : v3.15.0
84
- hooks :
85
- - id : pyupgrade
86
- args : [--py3-plus, --py38-plus, --keep-runtime-typing]
37
+ - repo : local
38
+ hooks :
39
+ - id : forbid-to-commit
40
+ name : Don't commit rej files
41
+ entry : |
42
+ Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates.
43
+ Fix the merge conflicts manually and remove the .rej files.
44
+ language : fail
45
+ files : ' .*\.rej$'
0 commit comments