forked from feder-observatory/stellarphot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
53 lines (50 loc) · 1.84 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
# Prevent giant files from being committed.
- id: check-toml
# Attempts to load all TOML files to verify syntax.
- id: check-yaml
# Attempts to load all yaml files to verify syntax.
- id: check-ast
# Simply check whether files parse as valid python.
- id: check-case-conflict
# Check for files with names that would conflict on a case-insensitive
# filesystem like MacOS HFS+ or Windows FAT.
- id: check-json
# Attempts to load all json files to verify syntax.
- id: end-of-file-fixer
# Makes sure files end in a newline and only a newline.
exclude_types: [image]
- id: trailing-whitespace
# Trims trailing whitespace.
- id: mixed-line-ending
# Makes all line endings unix-style
args: [--fix=lf]
# Per the ruff documentation, this should be before black
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.3
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.11
# per the documentation this should add codespell spell checking
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli