Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions 19 .github/workflows/shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Shared Checks
on:
workflow_call:

permissions:
contents: read

jobs:
pre-commit:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -46,3 +49,19 @@ jobs:
- name: Run pytest
run: uv run --frozen --no-sync pytest
continue-on-error: true

readme-snippets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
version: 0.7.2

- name: Install dependencies
run: uv sync --frozen --all-extras --python 3.10

- name: Check README snippets are up to date
run: uv run --frozen scripts/update_readme_snippets.py --check
Fixed Show fixed Hide fixed
7 changes: 7 additions & 0 deletions 7 .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ repos:
types: [python]
language: system
pass_filenames: false
exclude: ^README\.md$
- id: pyright
name: pyright
entry: uv run pyright
Expand All @@ -36,3 +37,9 @@ repos:
language: system
files: ^(pyproject\.toml|uv\.lock)$
pass_filenames: false
- id: readme-snippets
name: Check README snippets are up to date
entry: uv run scripts/update_readme_snippets.py --check
language: system
files: ^(README\.md|examples/.*\.py|scripts/update_readme_snippets\.py)$
pass_filenames: false
7 changes: 6 additions & 1 deletion 7 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ uv run ruff check .
uv run ruff format .
```

7. Submit a pull request to the same branch you branched from
7. Update README snippets if you modified example code:
```bash
uv run scripts/update_readme_snippets.py
```

8. Submit a pull request to the same branch you branched from

## Code Style

Expand Down
Loading
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.