Skip to content

Commit bfb8009

Browse files
feat: ✨ Python 3.14 support (#80)
1 parent e07dd1b commit bfb8009

File tree

9 files changed

+93
-431
lines changed

9 files changed

+93
-431
lines changed

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: sunday
8+
time: "13:15"
9+
timezone: Europe/Amsterdam
10+
open-pull-requests-limit: 10
11+
commit-message:
12+
prefix: "build"
13+
- package-ecosystem: "uv"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"
17+
day: sunday
18+
time: "13:00"
19+
timezone: Europe/Amsterdam
20+
open-pull-requests-limit: 10
21+
commit-message:
22+
prefix: "build"

.github/workflows/main.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@ on:
1010

1111
jobs:
1212
ci:
13+
strategy:
14+
matrix:
15+
python-version: ["3.10", "3.14"]
1316
runs-on: ubuntu-latest
1417
steps:
1518
- name: Checkout sources
16-
uses: actions/checkout@v4
19+
uses: actions/checkout@v5
1720

1821
- name: Set up uv
19-
uses: astral-sh/setup-uv@v5
22+
uses: astral-sh/setup-uv@v7
23+
with:
24+
python-version: ${{ matrix.python-version }}
2025

2126
- name: Install dependencies
2227
run: uv sync --locked --dev

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ dist/
44
main.spec
55
.coverage
66
coverage.xml
7+
.python-version

.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

codelimit/common/GithubRepository.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class GithubRepository:
66
owner: str
77
name: str
8-
branch: str | None = None
8+
branch: str
99
tag: str | None = None
1010

1111
def __str__(self) -> str:

codelimit/common/Scanner.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@
55
from pathlib import Path
66
from typing import Union, Callable
77

8-
from pathspec import PathSpec
9-
from pygments.lexer import Lexer
10-
from pygments.lexers import get_lexer_for_filename
11-
from pygments.util import ClassNotFound
12-
from rich import print
13-
from rich.live import Live
14-
158
from codelimit.common.Codebase import Codebase
169
from codelimit.common.Configuration import Configuration
1710
from codelimit.common.Language import Language
@@ -29,6 +22,12 @@
2922
calculate_checksum,
3023
)
3124
from codelimit.languages import Languages
25+
from pathspec import PathSpec
26+
from pygments.lexer import Lexer
27+
from pygments.lexers import get_lexer_for_filename
28+
from pygments.util import ClassNotFound
29+
from rich import print
30+
from rich.live import Live
3231

3332
locale.setlocale(locale.LC_ALL, "")
3433

@@ -205,4 +204,6 @@ def is_excluded(path: Path, spec: PathSpec):
205204
"venv",
206205
"test",
207206
"tests",
207+
"acceptancetests",
208+
"integrationtests"
208209
]

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "codelimit"
33
version = "0.20.2"
44
description = "Your Refactoring Alarm"
55
authors = [{ name = "Rob van der Leek", email = "robvanderleek@gmail.com" }]
6-
requires-python = ">=3.10,<3.14"
6+
requires-python = ">=3.10,<3.15"
77
readme = "README.md"
88
license = "GPL-3.0-or-later"
99
dependencies = [
@@ -14,7 +14,7 @@ dependencies = [
1414
"pyperclip>=1.9.0,<2",
1515
"pyyaml>=6.0.1,<7",
1616
"requests>=2.28.2,<3",
17-
"rich>=13.7.1,<14",
17+
"rich>=14.2.0",
1818
"sh>=2.1.0,<3",
1919
"typer>=0.16.0",
2020
]
@@ -29,15 +29,14 @@ codelimit = "codelimit.__main__:cli"
2929

3030
[dependency-groups]
3131
dev = [
32-
"pyinstaller~=6.0 ; python_version >= '3.8' and python_version < '3.14'",
3332
"pytest-cov>=4.0.0,<5",
3433
"pytest>=7.2.1,<8",
3534
"poethepoet>=0.21.1,<0.22",
3635
"types-pyyaml>=6.0.12.20240917,<7",
3736
"mypy>=1.13.0,<2",
3837
"black>=24.10.0,<25",
3938
"ruff>=0.8.2,<0.9",
40-
"python-semantic-release>=9.21.0",
39+
"pyinstaller>=6.16.0",
4140
]
4241

4342
[build-system]

tests/regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def compare_reports(r1: Report, r2: Report) -> bool:
6464
def run_repo(report_dir: Path) -> bool:
6565
result = True
6666
repo_parts = report_dir.name.split('_')
67-
repo = GithubRepository(repo_parts[0], repo_parts[1], tag=repo_parts[2])
67+
repo = GithubRepository(repo_parts[0], repo_parts[1], repo_parts[2], tag=repo_parts[2])
6868
info(f'Scanning {repo}')
6969
new_report = scan_repo(repo)
7070
old_report = load_report(report_dir)

uv.lock

Lines changed: 50 additions & 415 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)