From 5d00768c2578742a6fe2231fc94906c7047e922a Mon Sep 17 00:00:00 2001 From: Zach Kurtz Date: Fri, 22 Nov 2024 20:21:13 -0500 Subject: [PATCH] support back to python 3.10 --- .github/workflows/ci.yml | 14 ++++++++++++-- .python-version | 2 +- README.md | 3 ++- dummio/constants.py | 6 +++--- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55d868a..558203a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,15 +10,25 @@ jobs: build: name: continuous-integration runs-on: ubuntu-latest - + strategy: + matrix: + python-version: ['3.10', '3.12'] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Overwrite .python-version + run: echo ${{ matrix.python-version }} > .python-version + - name: Set up uv run: pip install uv - name: Check code quality with Ruff - run: uv run ruff check . + run: | + uv run ruff check + uv run ruff format --check - name: Check type hints with pyright run: uv run pyright diff --git a/.python-version b/.python-version index 8531a3b..e4fba21 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.12.2 +3.12 diff --git a/README.md b/README.md index 9c6d3cc..478ddf5 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ We're [on pypi](https://pypi.org/project/dummio/), so `pip install dummio`. git clone git@github.com:zkurtz/dummio.git cd dummio pip install uv -uv sync --group extras +uv sync source .venv/bin/activate +pre-commit install ``` diff --git a/dummio/constants.py b/dummio/constants.py index bae5e3f..1323831 100644 --- a/dummio/constants.py +++ b/dummio/constants.py @@ -1,10 +1,10 @@ """Constants for dummio.""" from pathlib import Path -from typing import Any +from typing import Any, TypeAlias -type PathType = str | Path -type AnyDict = dict[Any, Any] +PathType: TypeAlias = str | Path +AnyDict: TypeAlias = dict[Any, Any] DEFAULT_ENCODING = "utf-8" DEFAULT_WRITE_MODE = "w"