Skip to content

Commit 712bfb7

Browse files
committed
chore(uv): migrate from poetry to uv for dependency management
1 parent 7449241 commit 712bfb7

File tree

6 files changed

+355
-417
lines changed

6 files changed

+355
-417
lines changed

.claude/settings.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"hooks": [
66
{
77
"type": "command",
8-
"command": "poetry run python-claude session start"
8+
"command": "uv run python-claude session start"
99
},
1010
{
1111
"type": "command",
12-
"command": "poetry run python-claude git status"
12+
"command": "uv run python-claude git status"
1313
}
1414
]
1515
}
@@ -19,19 +19,19 @@
1919
"hooks": [
2020
{
2121
"type": "command",
22-
"command": "poetry run python-claude ruff format"
22+
"command": "uv run python-claude ruff format"
2323
},
2424
{
2525
"type": "command",
26-
"command": "poetry run python-claude ruff check"
26+
"command": "uv run python-claude ruff check"
2727
},
2828
{
2929
"type": "command",
30-
"command": "poetry run python-claude mypy"
30+
"command": "uv run python-claude mypy"
3131
},
3232
{
3333
"type": "command",
34-
"command": "poetry run python-claude pytest"
34+
"command": "uv run python-claude pytest"
3535
}
3636
]
3737
}
@@ -42,7 +42,7 @@
4242
"hooks": [
4343
{
4444
"type": "command",
45-
"command": "poetry run python-claude edited"
45+
"command": "uv run python-claude edited"
4646
}
4747
]
4848
}

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on:
44
push:
55
paths:
66
- .github/workflows/ci.yml
7-
- poetry.lock
7+
- uv.lock
88
- pyproject.toml
99
- src/**
1010
- tests/**
1111
pull_request:
1212
paths:
1313
- .github/workflows/ci.yml
14-
- poetry.lock
14+
- uv.lock
1515
- pyproject.toml
1616
- src/**
1717
- tests/**

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# python-claude
22

33
Python hooks for Claude Code for projects using:
4-
- poetry
4+
- uv
55
- ruff
66
- mypy
77
- pytest
@@ -21,7 +21,7 @@ Note: We defer all quality checks until Claude stops to avoid changing files whi
2121
## Installation
2222

2323
```bash
24-
poetry add python-claude
24+
uv add python-claude
2525
```
2626

2727
## Usage
@@ -51,11 +51,11 @@ Add hooks to your Claude Code settings.json:
5151
"hooks": [
5252
{
5353
"type": "command",
54-
"command": "poetry run python-claude session start"
54+
"command": "uv run python-claude session start"
5555
},
5656
{
5757
"type": "command",
58-
"command": "poetry run python-claude git status"
58+
"command": "uv run python-claude git status"
5959
}
6060
]
6161
}
@@ -65,19 +65,19 @@ Add hooks to your Claude Code settings.json:
6565
"hooks": [
6666
{
6767
"type": "command",
68-
"command": "poetry run python-claude ruff format"
68+
"command": "uv run python-claude ruff format"
6969
},
7070
{
7171
"type": "command",
72-
"command": "poetry run python-claude ruff check"
72+
"command": "uv run python-claude ruff check"
7373
},
7474
{
7575
"type": "command",
76-
"command": "poetry run python-claude mypy"
76+
"command": "uv run python-claude mypy"
7777
},
7878
{
7979
"type": "command",
80-
"command": "poetry run python-claude pytest"
80+
"command": "uv run python-claude pytest"
8181
}
8282
]
8383
}
@@ -88,7 +88,7 @@ Add hooks to your Claude Code settings.json:
8888
"hooks": [
8989
{
9090
"type": "command",
91-
"command": "poetry run python-claude edited"
91+
"command": "uv run python-claude edited"
9292
}
9393
]
9494
}
@@ -119,18 +119,18 @@ Each command will show whether the check is now enabled or disabled.
119119
You can also use the CLI directly:
120120

121121
```bash
122-
poetry run python-claude toggle pytest
123-
poetry run python-claude toggle mypy
124-
poetry run python-claude toggle ruff
122+
uv run python-claude toggle pytest
123+
uv run python-claude toggle mypy
124+
uv run python-claude toggle ruff
125125
```
126126

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

129129
## Development
130130

131131
```bash
132-
poetry install
133-
poetry run pytest
134-
poetry run ruff check
135-
poetry run mypy src
132+
uv sync
133+
uv run pytest
134+
uv run ruff check
135+
uv run mypy src
136136
```

0 commit comments

Comments
 (0)