-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
73 lines (66 loc) · 2.04 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
73 lines (66 loc) · 2.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
---
repos:
# We use a local ruff hook so that the ruff version matches the one in dev-dependencies
- repo: local
hooks:
- id: ruff-check
name: ruff check
language: python
types_or: [python, pyi, jupyter]
require_serial: true
entry: ruff check
args:
- --fix
- --exit-non-zero-on-fix
- --force-exclude
- id: ruff-format
name: ruff format
language: python
types_or: [python, pyi, jupyter]
require_serial: true
entry: ruff format
args:
- --force-exclude
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: debug-statements
- id: check-docstring-first
- repo: local
hooks:
- id: mypy
name: mypy
entry: poetry run dmypy run -- cognite tests
files: ^.*.(py|pyi)$
language: system
pass_filenames: false
- id: custom-checks
name: custom repo checks
entry: python scripts/run_checks.py
files: ^cognite/.*.(py|pyi)$
language: system
pass_filenames: true
require_serial: true # avoid possible race conditions
- id: sync-client-codegen
name: run sync codegen on changed files
entry: python scripts/sync_client_codegen/main.py run --files
files: ^cognite/.*.(py|pyi)$
language: system
pass_filenames: true
require_serial: true
- repo: https://github.com/jsh9/pydoclint # Run after 'custom-checks' as these may auto-fix
rev: 0.8.3
hooks:
- id: pydoclint
require_serial: true # Spammy in run-all scenarios (more than fast enough already)
args:
- --style=google
- --exclude=tests/|scripts/
- --quiet # otherwise prints all checked files that are ok...
- --skip-checking-raises=true
- --check-class-attributes=false
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
files: ^cognite/.*