-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.pre-commit-config.yaml
81 lines (73 loc) · 2.48 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
repos:
##############################################################################
# General checks
##############################################################################
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: fix-encoding-pragma
args: [--remove]
- id: end-of-file-fixer
types_or: [python]
- id: trailing-whitespace
types_or: [python]
- id: debug-statements
- id: detect-private-key
- id: check-builtin-literals
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
description: Checks for common misspellings.
types_or: [python, cython, rst, markdown]
##############################################################################
# Python formatting and linting
##############################################################################
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
name: add-trailing-comma
types: [python]
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
types_or: [python, pyi]
entry: "black"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: ["--fix"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.0
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports, --warn-no-return, --explicit-package-bases]
additional_dependencies: [types-pytz, types-redis, types-toml, types-requests, msgspec]
exclude: "nautilus_server/backend/api_v1/endpoints/models*"
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
##############################################################################
# Javascript formatting and linting
##############################################################################
- repo: https://github.com/pre-commit/mirrors-jshint
rev: "v2.13.6"
hooks:
- id: jshint
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
args: ["--print-width", "160"]