Skip to content
Open
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
14 changes: 7 additions & 7 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"hooks": [
{
"type": "command",
"command": "poetry run python-claude session start"
"command": "uv run python-claude session start"
},
{
"type": "command",
"command": "poetry run python-claude git status"
"command": "uv run python-claude git status"
}
]
}
Expand All @@ -19,19 +19,19 @@
"hooks": [
{
"type": "command",
"command": "poetry run python-claude ruff format"
"command": "uv run python-claude ruff format"
},
{
"type": "command",
"command": "poetry run python-claude ruff check"
"command": "uv run python-claude ruff check"
},
{
"type": "command",
"command": "poetry run python-claude mypy"
"command": "uv run python-claude mypy"
},
{
"type": "command",
"command": "poetry run python-claude pytest"
"command": "uv run python-claude pytest"
}
]
}
Expand All @@ -42,7 +42,7 @@
"hooks": [
{
"type": "command",
"command": "poetry run python-claude edited"
"command": "uv run python-claude edited"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
push:
paths:
- .github/workflows/ci.yml
- poetry.lock
- uv.lock
- pyproject.toml
- src/**
- tests/**
pull_request:
paths:
- .github/workflows/ci.yml
- poetry.lock
- uv.lock
- pyproject.toml
- src/**
- tests/**
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# python-claude

Python hooks for Claude Code for projects using:
- poetry
- uv
- ruff
- mypy
- pytest
Expand All @@ -21,7 +21,7 @@ Note: We defer all quality checks until Claude stops to avoid changing files whi
## Installation

```bash
poetry add python-claude
uv add python-claude
```

## Usage
Expand Down Expand Up @@ -51,11 +51,11 @@ Add hooks to your Claude Code settings.json:
"hooks": [
{
"type": "command",
"command": "poetry run python-claude session start"
"command": "uv run python-claude session start"
},
{
"type": "command",
"command": "poetry run python-claude git status"
"command": "uv run python-claude git status"
}
]
}
Expand All @@ -65,19 +65,19 @@ Add hooks to your Claude Code settings.json:
"hooks": [
{
"type": "command",
"command": "poetry run python-claude ruff format"
"command": "uv run python-claude ruff format"
},
{
"type": "command",
"command": "poetry run python-claude ruff check"
"command": "uv run python-claude ruff check"
},
{
"type": "command",
"command": "poetry run python-claude mypy"
"command": "uv run python-claude mypy"
},
{
"type": "command",
"command": "poetry run python-claude pytest"
"command": "uv run python-claude pytest"
}
]
}
Expand All @@ -88,7 +88,7 @@ Add hooks to your Claude Code settings.json:
"hooks": [
{
"type": "command",
"command": "poetry run python-claude edited"
"command": "uv run python-claude edited"
}
]
}
Expand Down Expand Up @@ -119,18 +119,18 @@ Each command will show whether the check is now enabled or disabled.
You can also use the CLI directly:

```bash
poetry run python-claude toggle pytest
poetry run python-claude toggle mypy
poetry run python-claude toggle ruff
uv run python-claude toggle pytest
uv run python-claude toggle mypy
uv run python-claude toggle ruff
```

The toggle state persists across Claude Code sessions, stored in `.claude/quality-checks.json` (which is gitignored). All checks are enabled by default.

## Development

```bash
poetry install
poetry run pytest
poetry run ruff check
poetry run mypy src
uv sync
uv run pytest
uv run ruff check
uv run mypy src
```
Loading