Skip to content

Commit 3ad3f43

Browse files
committed
Use ruff in CI
1 parent 8efe291 commit 3ad3f43

File tree

2 files changed

+14
-23
lines changed

2 files changed

+14
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,28 @@ on: [push]
44
jobs:
55
test:
66
env:
7-
POETRY_VERSION: "1.4.0"
7+
UV_VERSION: "0.8.22"
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ["3.10", "3.11"]
11+
python-version: ["3.11", "3.12", "3.13", "3.14"]
1212
steps:
1313
- uses: actions/checkout@v3
14-
- name: Load cached Poetry installation
15-
uses: actions/cache@v3
14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v6
1616
with:
17-
path: ~/.local
18-
key: ${{ runner.os }}-dotlocal-dir-py${{matrix.python-version }}-poetry${{ env.POETRY_VERSION }}
19-
- name: Install Poetry
20-
uses: snok/install-poetry@v1
21-
with:
22-
version: ${{ env.POETRY_VERSION }}
17+
version: ${{ env.UV_VERSION }}
18+
enable-cache: true
19+
- name: Install the dependencies
20+
run: uv sync --locked --all-extras --dev
2321
- uses: actions/setup-python@v4
2422
with:
2523
python-version: ${{ matrix.python-version }}
26-
cache: "poetry"
27-
- name: Install dependencies with poetry
28-
run: poetry install
24+
- name: Check format
25+
run: uv run ruff format --check .
2926
- name: Lint with ruff
30-
run: |
31-
# Stop the build if there are Python syntax errors or undefined names
32-
poetry run ruff --format=github --select=E9,F63,F7,F82 --target-version=py310 .
33-
# Default set of ruff rules with GitHub Annotations
34-
poetry run ruff --format=github --target-version=py310 .
27+
run: uv run ruff check --output-format github .
3528
- name: Static type checking with mypy
36-
run: |
37-
poetry run mypy plantuml_sequence
29+
run: uv run mypy plantuml_sequence
3830
- name: Test with pytest
39-
run: |
40-
poetry run pytest --cov
31+
run: uv run pytest --cov

plantuml_sequence/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _generate_next_value_(name: str, start: int, count: int, last_values: list[A
5353
__all__ = ["StrEnum", "LineWriter", "cwd", "temp_cwd", "string_io", "maybe_quote", "escape_newlines"]
5454

5555

56-
StrPath: TypeAlias = os.PathLike | str
56+
StrPath: TypeAlias = os.PathLike[str] | str
5757

5858

5959
class LineWriter:

0 commit comments

Comments
 (0)