Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.14"]
python-version: ["3.10", "3.14"]
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
Expand Down
9 changes: 5 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Python SDK and `holmanctl` CLI for controlling Holman Bluetooth tap timers (CO30

## Development
- Before finishing a change, run `uv run pytest`, `uv run ruff check .`, `uv run ruff format --check .` and `uv run pyrefly check`
- CI (`.github/workflows/ci.yml`) runs the same checks, with pytest on Python 3.9 and 3.14; keep `requires-python` and that matrix in sync
- CI (`.github/workflows/ci.yml`) runs the same checks, with pytest on Python 3.10 and 3.14; keep `requires-python` and that matrix in sync
- Ruff formats the Python snippets in `README.md` too
- Tests run with `--import-mode=importlib`, so share test helpers as fixtures in `conftest.py`, not by importing modules from `tests/`
- Tests cover logic only; when adding a `gatt` API call, add it to the fakes in `tests/conftest.py`
Expand All @@ -35,12 +35,13 @@ Python SDK and `holmanctl` CLI for controlling Holman Bluetooth tap timers (CO30

## Python Version

Python 3.9 minimum (`requires-python` in pyproject.toml; ruff and pyrefly also target 3.9). Use the newest syntax 3.9 supports:
Python 3.10 minimum (`requires-python` in pyproject.toml; ruff and pyrefly also target 3.10). Use the newest syntax 3.10 supports:
- `X | None` instead of `Optional[X]`
- `list[str]` instead of `List[str]`
- `dict[str, Any]` instead of `Dict[str, Any]`
- `tuple[int, str]` instead of `Tuple[int, str]`
- `X | None` instead of `Optional[X]` only in annotations, with `from __future__ import annotations` at the top of the module; `|` between types fails at runtime on 3.9 anywhere else (e.g. `isinstance`, aliases)
- No `match` statements (3.10) or `type X = ...` aliases (3.12); use `if`/`elif` and plain `X = ...` alias assignments (`typing.TypeAlias` is 3.10+, and `typing_extensions` isn't a dependency)
- `X: TypeAlias = ...` (from `typing`) for type aliases; `type X = ...` is 3.12+
- Match statements for enum/type dispatch where appropriate

## Manage packages

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ and [BTX1](https://www.holmanindustries.com.au/products/btx1-tap-mounted-smart-v
The Holman Python SDK for Linux allows you to integrate your Holman(s) into any type of Linux application or script that can execute Python code.

## Prerequisites
The Holman SDK requires [Python 3.9+](https://www.python.org) and a recent installation of [BlueZ](http://www.bluez.org/). It is tested to work fine with BlueZ 5.44, slightly older versions should however work, too.
The Holman SDK requires [Python 3.10+](https://www.python.org) and a recent installation of [BlueZ](http://www.bluez.org/). It is tested to work fine with BlueZ 5.44, slightly older versions should however work, too.

## Installation
These instructions assume a Debian-based Linux.
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT"
license-files = ["LICENSE.txt"]
authors = [{ name = "Scott McKenzie", email = "developers@noizyland.net" }]
keywords = ["holman"]
requires-python = ">=3.9"
requires-python = ">=3.10"
# python3-dbus is also required at runtime, but comes from apt (not PyPI).
dependencies = ["gatt>=0.2.7"]

Expand All @@ -20,7 +20,7 @@ holmanctl = "holmanctl:main"
[dependency-groups]
dev = [
"pyrefly>=1.3",
"pytest>=8",
"pytest>=9.0.3",
"ruff>=0.17",
]

Expand All @@ -39,12 +39,12 @@ testpaths = ["tests"]
addopts = ["--import-mode=importlib"]

[tool.ruff]
target-version = "py39"
target-version = "py310"

[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP"]

[tool.pyrefly]
project-includes = ["holman", "holmanctl.py", "tests"]
python-version = "3.9"
python-version = "3.10"
search-path = ["typings"]
52 changes: 4 additions & 48 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading