Skip to content

Commit cb1a316

Browse files
committed
pyright
1 parent cb85e20 commit cb1a316

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ repos:
4444
language: system
4545
types: [python]
4646
pass_filenames: false
47+
exclude: ^examples/snippets/
48+
- id: pyright-snippets
49+
name: pyright (snippets)
50+
entry: bash -c "cd examples/snippets && uv run pyright ."
51+
language: system
52+
files: ^examples/snippets/.*\.py$
53+
pass_filenames: false
4754
- id: uv-lock-check
4855
name: Check uv.lock is up to date
4956
entry: uv lock --check

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ uv run pytest
3737
uv run pyright
3838
```
3939

40+
Note: The `examples/snippets` directory has its own pyright configuration and is checked separately by pre-commit. If you're modifying examples in that directory, you can test locally with:
41+
42+
```bash
43+
cd examples/snippets && uv run pyright
44+
```
45+
4046
6. Run linting:
4147

4248
```bash

0 commit comments

Comments
 (0)