Skip to content

Commit bf06293

Browse files
authored
fix: set ruff target-version to py39 and upgrade django (#555)
Set ruff target-version to py39 (minimum supported Python) instead of py314 to prevent PEP 758 formatting (parentheses-free except clauses) that would break compatibility with Python < 3.14. Bump django minimum from >=5.0.8 to >=5.2.11 to resolve Dependabot security alerts (SQL injection, DoS, directory traversal).
1 parent 7b5fb68 commit bf06293

3 files changed

Lines changed: 109 additions & 36 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ uv run mypy statemachine/ tests/
7272

7373
## Code style
7474

75-
- **Formatter/Linter:** ruff (line length 99, target Python 3.14)
75+
- **Formatter/Linter:** ruff (line length 99, target Python 3.9)
7676
- **Rules:** pycodestyle, pyflakes, isort, pyupgrade, flake8-comprehensions, flake8-bugbear, flake8-pytest-style
7777
- **Imports:** single-line, sorted by isort
7878
- **Docstrings:** Google convention

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dev = [
4545
"pytest-benchmark >=4.0.0",
4646
"pytest-asyncio",
4747
"pydot",
48-
"django >=5.0.8; python_version >='3.10'",
48+
"django >=5.2.11; python_version >='3.10'",
4949
"pytest-django >=4.8.0; python_version >'3.8'",
5050
"Sphinx; python_version >'3.8'",
5151
"sphinx-gallery; python_version >'3.8'",
@@ -129,7 +129,7 @@ ignore_missing_imports = true
129129
src = ["statemachine"]
130130

131131
line-length = 99
132-
target-version = "py314"
132+
target-version = "py39"
133133

134134
# Exclude a variety of commonly ignored directories.
135135
exclude = [

0 commit comments

Comments
 (0)