-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
141 lines (141 loc) · 4.04 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
141 lines (141 loc) · 4.04 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [pre-commit]
# Enable this to enforce a common Python version:
default_language_version:
python: python3.11
ci:
skip: [
'uv-lock',
'pysentry',
'creosote',
'no-commit-to-branch',
# 'hadolint-docker',
# 'docker-compose-check',
'mypy-local', # Runs as a local hook now
]
repos:
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.6.1
hooks:
- id: check-pre-commit-ci-config
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.22
hooks:
- id: uv-lock
- repo: https://github.com/tsvikas/sync-with-uv
rev: v0.5.0
hooks:
- id: sync-with-uv
- repo: https://github.com/pysentry/pysentry-pre-commit
rev: v0.3.13
hooks:
- id: pysentry # default pysentry settings
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
args: ['--keep-runtime-typing', '--py311-plus']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.11
hooks:
- id: ruff-check
args: ['--fix', '--exit-non-zero-on-fix']
- id: ruff-format
- repo: https://github.com/PyCQA/pylint
rev: v4.0.4
hooks:
- id: pylint
args: [
'--disable=import-error',
'-rn', # Disable full report
'-sn', # Disable evaluation score
'--ignore-paths=migrations',
]
additional_dependencies:
- tomli
- repo: https://github.com/fredrikaverpil/creosote
rev: v4.1.0
hooks:
- id: creosote
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
args:
- --external-sources
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
exclude: ^(uv.lock|package-lock.json)$
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: forbid-new-submodules
- id: mixed-line-ending
- id: name-tests-test
args: ['--pytest']
- id: no-commit-to-branch
- id: requirements-txt-fixer
files: requirements/.*\.in
- id: trailing-whitespace
args: ['--markdown-linebreak-ext=md']
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs
- repo: https://github.com/pycontribs/mirrors-prettier
rev: v3.6.2
hooks:
- id: prettier
- repo: https://github.com/ducminh-phan/reformat-gherkin
rev: v3.0.1
hooks:
- id: reformat-gherkin
files: \.feature$
# - repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
# rev: v1.1.2
# hooks:
# - id: dockerfile_lint
# files: .*Dockerfile.*
# - repo: https://github.com/hadolint/hadolint
# rev: v2.12.1-beta
# hooks:
# - id: hadolint-docker
# - repo: https://github.com/IamTheFij/docker-pre-commit
# rev: v3.0.1
# hooks:
# - id: docker-compose-check
- repo: local
hooks:
- id: mypy-local
name: mypy
entry: uv run mypy
args:
- --no-warn-unused-ignores
- --no-warn-redundant-casts
- . # Required to honour settings in pyproject.toml
language: system
types_or: [python, pyi]
require_serial: true
pass_filenames: false # Mypy is unreliable if module import order varies