-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
62 lines (57 loc) · 1.75 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
repos:
- repo: https://github.com/python-poetry/poetry
rev: "1.8.5"
hooks:
- id: poetry-check
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.8.4"
hooks:
- id: ruff
args:
- --exit-non-zero-on-fix
- --config=pyproject.toml
- id: ruff-format
args:
- --config=pyproject.toml
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: check-yaml
exclude: "mkdocs.yml|^test_apply/demo_.*.yml"
- id: debug-statements
- id: end-of-file-fixer
exclude: "^toolkit/modules/resync/.+yaml$"
- id: name-tests-test
args:
- --pytest-test-first
exclude: "constants.py|mock_.*.py"
- id: trailing-whitespace
- id: no-commit-to-branch
- repo: https://github.com/google/yamlfmt
rev: v0.14.0
hooks:
- id: yamlfmt
# Mypy must be run in the local system environment, not in the pre-commit environment.
- repo: local
hooks:
- id: mypy
name: mypy
# Gradually, the entire codebase should be checked by mypy, plan is to gradually add mypy for each
# module as we refactor it.
entry: dmypy run -- cognite/powerops/resync cognite/powerops/utils
files: ^.*.(py|pyi)$
language: system
pass_filenames: false
- id: "resync"
name: "resync"
entry: "powerops pre-build power_ops_config.yaml resync/configuration.yaml --silent"
files: "resync/"
language: system
pass_filenames: false