Skip to content

Commit 4ed5cad

Browse files
committed
drop Python 3.9 support, fix mutmut CLI, align lint to min version
1 parent e09427a commit 4ed5cad

3 files changed

Lines changed: 13 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ jobs:
5151
- name: Checkout Code
5252
uses: actions/checkout@v6
5353

54-
- name: Set up Python 3.11
54+
- name: Set up Python 3.10
5555
uses: actions/setup-python@v6
5656
with:
57-
python-version: '3.11'
57+
python-version: '3.10'
5858

5959
- name: Cache pip Dependencies
6060
uses: actions/cache@v5
6161
with:
6262
path: ~/.cache/pip
63-
key: ${{ runner.os }}-lint-pip-3.11-${{ hashFiles('**/pyproject.toml') }}
63+
key: ${{ runner.os }}-lint-pip-3.10-${{ hashFiles('**/pyproject.toml') }}
6464
restore-keys: |
65-
${{ runner.os }}-lint-pip-3.11-
65+
${{ runner.os }}-lint-pip-3.10-
6666
6767
- name: Install Linters and Type Checker
6868
run: |
@@ -87,7 +87,7 @@ jobs:
8787
fail-fast: false
8888
matrix:
8989
os: [ubuntu-latest, macos-latest, windows-latest]
90-
python-version: [3.9, '3.10', '3.11', '3.12', '3.13']
90+
python-version: ['3.10', '3.11', '3.12', '3.13']
9191

9292
runs-on: ${{ matrix.os }}
9393

@@ -153,7 +153,7 @@ jobs:
153153
strategy:
154154
fail-fast: false
155155
matrix:
156-
python-version: [pypy-3.9, pypy-3.10]
156+
python-version: [pypy-3.10, pypy-3.11]
157157

158158
steps:
159159
- name: Checkout Code
@@ -208,7 +208,7 @@ jobs:
208208
209209
- name: Run mutation testing
210210
run: |
211-
mutmut run --paths-to-mutate=src/treemapper/ --tests-dir=tests/ || true
211+
mutmut run || true
212212
mutmut results || true
213213
214214
# ============================================================================
@@ -332,7 +332,7 @@ jobs:
332332
sonar.tests=tests
333333
sonar.python.coverage.reportPaths=coverage.xml
334334
sonar.python.xunit.reportPath=test-results.xml
335-
sonar.python.version=3.9,3.10,3.11,3.12,3.13
335+
sonar.python.version=3.10,3.11,3.12,3.13
336336
EOF
337337
338338
- name: SonarCloud Scan

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ line_length = 130
1313

1414
[tool.ruff]
1515
line-length = 130
16-
target-version = "py39"
16+
target-version = "py310"
1717

1818
[tool.ruff.lint]
1919
select = ["E", "F", "W", "I", "N", "UP", "RUF"]
2020
ignore = ["E501"] # Line length handled by black
2121

2222
[tool.mypy]
23-
python_version = "3.9"
23+
python_version = "3.10"
2424
strict = true
2525
warn_return_any = true
2626
warn_unused_configs = true
@@ -69,15 +69,14 @@ authors = [
6969
]
7070
description = "Export codebase structure and contents for AI/LLM context"
7171
readme = "README.md"
72-
requires-python = ">=3.9"
72+
requires-python = ">=3.10"
7373
license = { file = "LICENSE" }
7474
keywords = ["code-analysis", "directory-tree", "yaml", "json", "llm", "ai", "codebase", "context", "chatgpt", "claude", "code-context", "export", "tree", "gpt-context", "llm-context", "code-to-prompt", "claude-context"]
7575
classifiers = [
7676
"Development Status :: 5 - Production/Stable",
7777
"Environment :: Console",
7878
"Intended Audience :: Developers",
7979
"Programming Language :: Python :: 3",
80-
"Programming Language :: Python :: 3.9",
8180
"Programming Language :: Python :: 3.10",
8281
"Programming Language :: Python :: 3.11",
8382
"Programming Language :: Python :: 3.12",

tests/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tests/utils.py
22
from collections.abc import Hashable
33
from pathlib import Path
4-
from typing import Any, Optional
4+
from typing import Any
55

66
import pytest
77
import yaml
@@ -35,7 +35,7 @@ def get_all_files_in_tree(node: dict[str, Any]) -> set[str]:
3535
return names
3636

3737

38-
def find_node_by_path(tree: dict[str, Any], path_segments: list[str]) -> Optional[dict[str, Any]]:
38+
def find_node_by_path(tree: dict[str, Any], path_segments: list[str]) -> dict[str, Any] | None:
3939
"""Find a node in the tree by list of path segments relative to root node."""
4040
current_node = tree
4141
for segment in path_segments:

0 commit comments

Comments
 (0)