-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
.pre-commit-config.yaml
86 lines (79 loc) · 2.73 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
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-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude: ".*(data.*|extern.*|licenses.*|.*.fits)$"
- id: trailing-whitespace
exclude: ".*(data.*|extern.*|licenses.*|.*.fits)$"
# We list the warnings/errors to check for here rather than in setup.cfg because
# we don't want these options to apply whenever anyone calls flake8 from the
# command-line or their code editor - in this case all warnings/errors should be
# checked for. The warnings/errors we check for here are:
# E101 - mix of tabs and spaces
# W191 - use of tabs
# E201 - whitespace after '('
# E202 - whitespace before ')'
# W291 - trailing whitespace
# W292 - no newline at end of file
# W293 - trailing whitespace
# W391 - blank line at end of file
# E111 - 4 spaces per indentation level
# E112 - 4 spaces per indentation level
# E113 - 4 spaces per indentation level
# E301 - expected 1 blank line, found 0
# E302 - expected 2 blank lines, found 0
# E303 - too many blank lines (3)
# E304 - blank lines found after function decorator
# E305 - expected 2 blank lines after class or function definition
# E306 - expected 1 blank line before a nested definition
# E502 - the backslash is redundant between brackets
# E722 - do not use bare except
# E901 - SyntaxError or IndentationError
# E902 - IOError
# E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
# F822: undefined name in __all__
# F823: local variable name referenced before assignment
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
args:
[
"--count",
"--select",
"E101,W191,E201,E202,W291,W292,W293,W391,E111,E112,E113,E30,E502,E722,E901,E902,E999,F822,F823",
]
exclude: ".*(data.*|extern.*|cextern)$"
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/numpy/numpydoc
rev: v1.8.0
hooks:
- id: numpydoc-validation
files: ".*(high_level|mosaicking).*$"
exclude: ".*(tests.*)$"
- repo: https://github.com/scientific-python/cookie
rev: 2024.08.19
hooks:
- id: sp-repo-review
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ["--write-changes"]
additional_dependencies:
- tomli
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.0"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
ci:
autofix_prs: false