Skip to content

Commit 2d30658

Browse files
committed
chore: upgrade all dependencies to latest versions
Bump all dev and runtime dependency minimums to their latest releases: pydot 4.0.1, ruff 0.15.8, pytest-cov 7.1.0, pytest-benchmark 5.2.3, pytest-asyncio 1.3.0, django 6.0.3, furo 2025.12.19, pyright 1.1.408, among others. Update ruff pre-commit hook to v0.15.8. Adjust Python version markers for django (>=3.12), pytest-asyncio (>=3.10), and pytest-django (>=3.10) to match new minimum requirements. Fix pydot 4.x compatibility: type annotations for Edge kwargs and diagram test for attribute quoting change.
1 parent f76a160 commit 2d30658

5 files changed

Lines changed: 1787 additions & 649 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
exclude: docs/auto_examples
1010
- repo: https://github.com/charliermarsh/ruff-pre-commit
1111
# Ruff version.
12-
rev: v0.15.0
12+
rev: v0.15.8
1313
hooks:
1414
# Run the linter.
1515
- id: ruff

pyproject.toml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,37 @@ requires-python = ">=3.9"
2828
homepage = "https://github.com/fgmacedo/python-statemachine"
2929

3030
[project.optional-dependencies]
31-
diagrams = ["pydot >= 2.0.0"]
31+
diagrams = ["pydot >= 4.0.1"]
3232

3333
[dependency-groups]
3434
dev = [
35-
"ruff >=0.15.0",
35+
"ruff >=0.15.8",
3636
"pre-commit",
3737
"mypy",
3838
"pytest",
39-
"pytest-cov >=6.0.0; python_version >='3.9'",
39+
"pytest-cov >=7.1.0; python_version >='3.9'",
4040
"pytest-cov; python_version <'3.9'",
41-
"pytest-sugar >=1.0.0",
42-
"pytest-mock >=3.14.0",
43-
"pytest-benchmark >=4.0.0",
44-
"pytest-asyncio >=0.25.0",
41+
"pytest-sugar >=1.1.1",
42+
"pytest-mock >=3.15.1",
43+
"pytest-benchmark >=5.2.3",
44+
"pytest-asyncio >=1.3.0; python_version >='3.10'",
45+
"pytest-asyncio >=0.25.0; python_version <'3.10'",
4546
"pydot",
46-
"django >=5.2.11; python_version >='3.10'",
47-
"pytest-django >=4.8.0; python_version >'3.8'",
47+
"django >=6.0.3; python_version >='3.12'",
48+
"pytest-django >=4.12.0; python_version >='3.10'",
4849
"Sphinx; python_version >'3.8'",
4950
"sphinx-gallery; python_version >'3.8'",
5051
"myst-parser; python_version >'3.8'",
5152
"pillow; python_version >'3.8'",
5253
"sphinx-autobuild; python_version >'3.8'",
53-
"furo >=2024.5.6; python_version >'3.8'",
54+
"furo >=2025.12.19; python_version >'3.8'",
5455
"sphinx-copybutton >=0.5.2; python_version >'3.8'",
5556
"sphinxcontrib-mermaid; python_version >'3.8'",
56-
"pdbr>=0.8.9; python_version >'3.8'",
57-
"babel >=2.16.0; python_version >='3.8'",
58-
"pytest-xdist>=3.6.1",
59-
"pytest-timeout>=2.3.1",
60-
"pyright>=1.1.400",
57+
"pdbr>=0.9.7; python_version >'3.8'",
58+
"babel >=2.18.0; python_version >='3.8'",
59+
"pytest-xdist>=3.8.0",
60+
"pytest-timeout>=2.4.0",
61+
"pyright>=1.1.408",
6162
]
6263

6364
[build-system]

statemachine/contrib/diagram/renderers/dot.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from dataclasses import dataclass
22
from dataclasses import field
3+
from typing import Any
34
from typing import Dict
45
from typing import List
56
from typing import Optional
@@ -210,7 +211,7 @@ def _render_initial_arrow(
210211
initial_node = self._create_initial_node(initial_node_id)
211212
added_to_atomic = False
212213

213-
extra = {}
214+
extra: Dict[str, Any] = {}
214215
if initial_state.children:
215216
extra["lhead"] = f"cluster_{initial_state.id}"
216217

@@ -483,9 +484,9 @@ def _resolve_edge_endpoints(
483484
self,
484485
transition: DiagramTransition,
485486
target_id: Optional[str],
486-
) -> "tuple[str, str, Dict[str, str]]":
487+
) -> "tuple[str, str, Dict[str, Any]]":
487488
"""Resolve source/destination node IDs and cluster attributes for an edge."""
488-
extra: Dict[str, str] = {}
489+
extra: Dict[str, Any] = {}
489490
source_is_compound = transition.source in self._compound_ids
490491
target_is_compound = target_id is not None and target_id in self._compound_ids
491492

tests/test_contrib_diagram.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ class parent(State.Compound, name="Parent"):
384384
enter = start.to(parent)
385385

386386
dot = DotGraphMachine(SM)().to_string()
387-
assert "lhead=cluster_parent" in dot
387+
assert "lhead=" in dot
388+
assert "cluster_parent" in dot
388389

389390

390391
def test_initial_edge_inside_compound_subgraph():

0 commit comments

Comments
 (0)