Skip to content

Commit 5d79a70

Browse files
committed
fix: precommit hooks for different pyproject
1 parent e4f451e commit 5d79a70

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"hooks": [
77
{
88
"type": "command",
9-
"command": "ruff check --fix --config=core/pyproject.toml \"$CLAUDE_FILE_PATH\" 2>/dev/null; ruff format --config=core/pyproject.toml \"$CLAUDE_FILE_PATH\" 2>/dev/null; true"
9+
"command": "ruff check --fix \"$CLAUDE_FILE_PATH\" 2>/dev/null; ruff format \"$CLAUDE_FILE_PATH\" 2>/dev/null; true"
1010
}
1111
]
1212
}

.pre-commit-config.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@ repos:
33
rev: v0.8.6
44
hooks:
55
- id: ruff
6-
name: ruff lint
7-
args: [--fix, --config=core/pyproject.toml]
6+
name: ruff lint (core)
7+
args: [--fix]
8+
files: ^core/
9+
- id: ruff
10+
name: ruff lint (tools)
11+
args: [--fix]
12+
files: ^tools/
13+
- id: ruff-format
14+
name: ruff format (core)
15+
files: ^core/
816
- id: ruff-format
9-
name: ruff format
10-
args: [--config=core/pyproject.toml]
17+
name: ruff format (tools)
18+
files: ^tools/

0 commit comments

Comments
 (0)