forked from withmartian/adapters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
113 lines (113 loc) · 3.35 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
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
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
stages: [commit, manual]
# Ignore generated folder.
- id: pretty-format-json
stages: [commit, manual]
args: [--autofix]
exclude: .vscode|dist|build|.venv
- id: sort-simple-yaml
stages: [commit, manual]
- id: mixed-line-ending
stages: [commit, manual]
# - id: flake8
- id: fix-encoding-pragma
stages: [commit, manual]
args: ["--remove"]
- id: end-of-file-fixer
stages: [commit, manual]
# Ignore generated folder
- id: detect-private-key
stages: [commit, manual]
- id: debug-statements
stages: [commit, manual]
- id: check-yaml
exclude: "k8s"
stages: [commit, manual]
args: ["--unsafe"]
- id: check-xml
stages: [commit, manual]
- id: check-toml
stages: [commit, manual]
- id: check-merge-conflict
stages: [commit, manual]
- id: check-json
stages: [commit, manual]
exclude: .vscode
- id: check-executables-have-shebangs
stages: [commit, manual]
- id: check-docstring-first
stages: [commit, manual]
- id: check-case-conflict
stages: [commit, manual]
- id: fix-byte-order-marker
stages: [commit, manual]
- id: check-builtin-literals
stages: [commit, manual]
- id: check-ast
stages: [commit, manual]
# - id: check-added-large-files
# stages: [commit, manual]
# args: ["--maxkb=2500"]
- repo: https://github.com/ambv/black
rev: 23.9.1
hooks:
- id: black
language_version: python3.
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black"]
- repo: https://github.com/PyCQA/pylint
rev: v3.0.1
hooks:
- id: pylint
types: [python]
args: [
--rcfile,
.pylintrc,
-sn, # Don't display the score.
]
- repo: https://github.com/pre-commit/mirrors-mypy
# Keep in sync with pyproject.toml
rev: v1.6.0
hooks:
- id: mypy
args: [--show-error-codes, --show-traceback]
additional_dependencies:
- asyncio==3.4.3
- aiohttp==3.8.5
- aiolimiter==1.1.0
- anthropic==0.26.1
- pydantic==2.4.2
- pytest==7.4.2
- yarl==1.9.2
- types-python-dateutil==2.8.19.13
- types-requests==2.31.0.1
- tiktoken==0.5.1
- openai==1.10.0
- vcrpy==6.0.1
# - repo: https://github.com/yunojuno/pre-commit-xenon
# rev: cc59b0431a5d072786b59430e9b342b2881064f6
# hooks:
# - id: xenon
# files: ^(adapters)
# args:
# ["--max-absolute", "B", "--max-modules", "B", "--max-average", "B"]
- repo: https://github.com/PyCQA/bandit
rev: "1.7.5"
hooks:
- id: bandit
files: ^co2ai
args: [--skip, "B404,B607,B603,B101"] # TODO: disable only for instance
- repo: https://github.com/lk16/detect-missing-init
rev: v0.1.6
hooks:
- id: detect-missing-init
args: ["--track", "--python-folders", "adapters, tests"]