Skip to content

Commit 1abbaaa

Browse files
committed
Replace most references to poetry with uv
1 parent 1680d07 commit 1abbaaa

5 files changed

Lines changed: 21 additions & 14 deletions

File tree

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
!pydis_core/
44
!dev/
55
!pyproject.toml
6-
!poetry.lock
6+
!uv.lock
77
!README.md

.pre-commit-config.yaml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-merge-conflict
66
- id: check-toml
@@ -11,11 +11,18 @@ repos:
1111

1212
- repo: local
1313
hooks:
14-
- id: ruff
15-
name: ruff
16-
description: Run ruff linting
17-
entry: poetry run ruff check --force-exclude
18-
language: system
19-
'types_or': [python, pyi]
20-
require_serial: true
21-
args: [--fix, --exit-non-zero-on-fix]
14+
- id: uv-lock
15+
name: uv-lock
16+
description: "Automatically run 'uv lock' on your project dependencies"
17+
entry: uv lock
18+
language: system
19+
files: ^(uv\.lock|pyproject\.toml|uv\.toml)$
20+
pass_filenames: false
21+
- id: ruff
22+
name: ruff
23+
description: Run ruff linting
24+
entry: uv run --locked ruff check --force-exclude
25+
language: system
26+
'types_or': [python, pyi]
27+
require_serial: true
28+
args: [--fix, --exit-non-zero-on-fix]

dev/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Option 1
2222
- The path provided to install should be the root directory of this project on your machine.
2323
That is, the folder which contains the ``pyproject.toml`` file.
2424
- Make sure to install in the correct environment. Most Python Discord projects use
25-
poetry, so you can run ``poetry run pip install /path/to/pydis_core``.
25+
uv, so you can run ``uv run -- pip install /path/to/pydis_core``.
2626

2727
3. You can now use features from your local bot-core changes.
2828
To load new changes, run the install command again.

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Table of contents:
1212
## Building
1313
To build the docs, you can use the following task:
1414
```shell
15-
poetry run task docs
15+
uv run task docs
1616
```
1717

1818
The output will be in the [`/docs/build`](.) directory.
@@ -42,7 +42,7 @@ The project supports building all different versions at once using [sphinx-multi
4242
after version `v7.1.0`. You can run the following command to achieve that:
4343

4444
```shell
45-
poetry run sphinx_multiversion -v docs docs/build -n -j auto -n
45+
uv run sphinx_multiversion -v docs docs/build -n -j auto -n
4646
```
4747

4848
This will build all tags, as well as the main branch. To build branches besides the main one

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# The full version, including alpha/beta/rc tags
3636
release = version = tomli.loads(
3737
(PROJECT_ROOT / "pyproject.toml").read_text(encoding="utf-8")
38-
)["tool"]["poetry"]["version"]
38+
)["project"]["version"]
3939

4040
# -- General configuration ---------------------------------------------------
4141

0 commit comments

Comments
 (0)