-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
103 lines (103 loc) · 3.09 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# pre-commit run --all-files
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: end-of-file-fixer
files: \.(py|sh|rst|yml|yaml)$
- id: mixed-line-ending
- id: trailing-whitespace
files: \.(py|sh|rst|yml|yaml)$
- repo: local
hooks:
- id: no-tabs
name: No tabs
description: Reject any files containing a tab
entry: '\t'
language: pygrep
files: \.(py|sh|rst|yml|yaml)$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
hooks:
# Run the Ruff linter (flake8 alternative):
- id: ruff
args: [
'--fix',
'--exit-non-zero-on-fix',
'--extend-select=B,PIE,D,I,ISC,UP',
'--extend-ignore=D203,D213,UP031',
'--config=lint.isort.force-single-line=true',
'--config=lint.isort.order-by-type=false',
]
# Run the Ruff formatter (black alternative):
- id: ruff-format
args: [
'--config=format.docstring-code-format=true'
]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [
'flake8-blind-except',
'flake8-docstrings',
'flake8-rst-docstrings',
'flake8-bugbear',
'flake8-sfs',
'flake8-pie',
'flake8-comprehensions',
'flake8-implicit-str-concat',
'pydocstyle>=5.0.0',
]
- repo: https://github.com/asottile/blacken-docs
rev: 1.19.1
hooks:
- id: blacken-docs
additional_dependencies: [black==23.10.1]
exclude: ^.github/
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.4
hooks:
- id: rstcheck
args: [
--report-level=warning,
--ignore-roles=ref,
"--ignore-directives=automodule,toctree",
--ignore-substitutions=version
]
- repo: https://github.com/PyCQA/doc8
rev: 'v1.1.2'
hooks:
- id: doc8
additional_dependencies: [pygments]
args: [--quiet,--ignore=D001]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
files: \.(py|sh|rst|yml|yaml)$
args: ['-L', 'sintax,nin,otu']
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
# equivalent to "files" in .mypy.ini
files: '^(thapbi_pict|scripts)/'
additional_dependencies: [biopython>=1.82]
ci:
# Settings for the https://pre-commit.ci/ continuous integration service
autofix_prs: true
# Default message is more verbose
autoupdate_commit_msg: '[pre-commit.ci] autoupdate'
# Default is weekly
autoupdate_schedule: monthly