Skip to content

Commit 455161d

Browse files
Ryan Jamescursoragent
andcommitted
Fix remaining CI: 3.11 TypeVar and Graphviz on all OSes.
Replace PEP 695 generics in simulate_configs (invalid on 3.11) and install the Graphviz system binary via setup-graphviz for macOS/Windows. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b8b4c63 commit 455161d

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ jobs:
2727
run: echo '${{ matrix.python-version }}' > .python-version
2828

2929
- name: Install Graphviz
30-
if: matrix.os == 'ubuntu-latest'
31-
run: sudo apt-get update && sudo apt-get install -y graphviz
30+
uses: ts-graphviz/setup-graphviz@v2
3231

3332
- name: Install package and dependencies
3433
run: uv sync --extra test

‎pensive/automata/_config_simulation.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@
99
from __future__ import annotations
1010

1111
from collections.abc import Callable, Iterable
12+
from typing import TypeVar
1213

14+
Config = TypeVar("Config")
15+
Step = TypeVar("Step")
1316

14-
def simulate_configs[Config, Step](
17+
18+
def simulate_configs(
1519
initial: set[Config],
1620
steps: Iterable[Step],
1721
step_fn: Callable[[Config, Step], Iterable[Config]],

‎pyproject.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ ignore = [
175175
[tool.ruff.lint.per-file-ignores]
176176
"test_*.py" = ["N817", "S101"]
177177
"__init__.py" = ["F401", "F403"]
178+
# PEP 695 type-parameter syntax requires Python 3.12+; keep TypeVar for 3.11.
179+
"pensive/automata/_config_simulation.py" = ["UP047"]
178180

179181
[tool.ruff.lint.isort]
180182
known-first-party = ["pensive"]

0 commit comments

Comments
 (0)