Skip to content

Commit e32bf07

Browse files
committed
docs: Update CLAUDE.md with ruff and pre-commit info
1 parent e21e8c1 commit e32bf07

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Diff for: CLAUDE.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,15 @@ This file is intended to be used by an LLM such as Claude.
2929
- Handles both formatting and linting
3030
- For formatting: `uv run ruff format .`
3131
- For checking: `uv run ruff check .`
32+
- For auto-fixing: `uv run ruff check . --fix`
3233
- Common issues:
3334
- Line length (default 88 chars)
34-
- Import sorting
35+
- Import sorting (I001 errors)
3536
- Unused imports
37+
- When line length errors occur:
38+
- For strings, use parentheses and line continuation
39+
- For function calls, use multiple lines with proper indentation
40+
- For imports, split into multiple lines
3641

3742
### Pyright
3843
- Type checker
@@ -42,6 +47,18 @@ This file is intended to be used by an LLM such as Claude.
4247
- Optional types need explicit None checks
4348
- String operations need type narrowing
4449

50+
## Pre-commit Hooks
51+
52+
- Configuration in `.pre-commit-config.yaml`
53+
- Runs automatically on git commit
54+
- Includes:
55+
- Prettier for YAML/JSON formatting
56+
- Ruff for Python formatting and linting
57+
- When updating ruff version:
58+
- Check available versions on PyPI
59+
- Update `rev` in config to match available version
60+
- Add and commit config changes before other changes
61+
4562
## Best Practices
4663

4764
1. Always check git status and diff before committing

0 commit comments

Comments
 (0)