Skip to content

Commit 9d8b6d2

Browse files
committed
add pre-commit checks
1 parent 34da099 commit 9d8b6d2

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.pre-commit-config.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
14
ci:
25
autoupdate_commit_msg: "chore: update pre-commit hooks"
36
autofix_commit_msg: "style: pre-commit fixes"
@@ -11,3 +14,24 @@ repos:
1114
args: [--fix, --show-fixes]
1215
- id: ruff-format
1316
types_or: [python, pyi, jupyter]
17+
18+
repos:
19+
- repo: https://github.com/pre-commit/pre-commit-hooks
20+
rev: v5.0.0
21+
hooks:
22+
- id: trailing-whitespace
23+
exclude: '.*\.fits$'
24+
- id: end-of-file-fixer
25+
exclude_types: [csv]
26+
exclude: '.*\.fits$'
27+
- id: check-yaml
28+
# prevent addition of (presumably data) files >= 1 MB
29+
# (for such files, see https://learn.astropy.org/contributing/how-to-contribute)
30+
- id: check-added-large-files
31+
args: ["--maxkb=1000"]
32+
33+
- repo: https://github.com/kynan/nbstripout
34+
rev: 0.8.1
35+
hooks:
36+
- id: nbstripout
37+
args: ["--extra-keys='metadata.kernelspec metadata.language_info.version metadata.toc'"]

0 commit comments

Comments
 (0)