-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
39 lines (37 loc) · 1.47 KB
/
.pre-commit-config.yaml
File metadata and controls
39 lines (37 loc) · 1.47 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
# File: .pre-commit-config.yaml
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 # Use a recent version
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version. Must be aligned with the version in pyproject.toml
rev: v0.15.0 # Match local version
hooks:
# Run the linter. Applies fixes including import sorting, etc.
- id: ruff
args: [--fix, --exit-non-zero-on-fix] # Auto-fix and fail if fixes were made
# Run the formatter. Ensures final code style consistency.
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0 # Use a recent version of mypy mirror
hooks:
- id: mypy
# Ensure mypy runs with the necessary dependencies installed
additional_dependencies:
- "click>=8.0,<9.0"
- "langchain>=1.0"
- "langchain-core>=1.0"
- "langchain-community>=0.4.0"
- "langchain-google-genai>=1.0"
- "langgraph>=1.0.0"
- "pydantic>=2.0,<3.0"
- "types-setuptools"
args: [--config-file=pyproject.toml] # Point mypy to the config
# You might need to adjust entry if your structure changes
# entry: mypy commitai commitai/tests