Skip to content

Commit 70bd902

Browse files
Mazyodclaude
andcommitted
docs: add ruff linting and formatting commands to CLAUDE.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5288fdd commit 70bd902

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ uvx pyright # Run pyright type checker
1818
uvx pyright lsp_types/ # Check only library code
1919
uvx pyright tests/ # Check only test code
2020

21+
# Linting and formatting (required before committing)
22+
uvx ruff check . # Check for linting errors
23+
uvx ruff check . --fix # Auto-fix linting errors
24+
uvx ruff format . # Format code
25+
uvx ruff check . --select I --fix # Sort imports
26+
2127
# Generate latest LSP types (full pipeline)
2228
make generate-latest-types # Downloads schemas + generates all types
2329

@@ -128,7 +134,7 @@ The `examples/` directory contains demo scripts showing library usage:
128134
### Important Notes
129135

130136
- Always prefix test commands with `uv run`
131-
- **Before committing**: Run both tests (`uv run pytest`) AND type checking (`uvx pyright`) - CI will fail if either has errors
137+
- **Before committing**: Run tests (`uv run pytest`), type checking (`uvx pyright`), and linting (`uvx ruff check .`) - CI will fail if any have errors
132138
- Pool tests require `pyright-langserver` and/or `pyrefly` binaries available in PATH
133139
- Type generation requires Python 3.12+ for modern TypedDict features
134140
- Generated types should not be manually edited - regenerate from schemas

0 commit comments

Comments
 (0)