Skip to content
This repository was archived by the owner on Jan 18, 2026. It is now read-only.

Commit b16f742

Browse files
committed
fix: support 3.9+
1 parent 4d1fb1b commit b16f742

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

.pre-commit-hooks.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
name: Sync uv and pre commit
33
description: Sync uv and pre commit
44
language: python
5-
language_version: "3.12"
65
entry: "sync_uv_pre_commit"
76
minimum_pre_commit_version: "2.9.2"
87
require_serial: true

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Sync uv and pre commit"
55
authors = [{ name = "phi", email = "phi.friday@gmail.com" }]
66
readme = "README.md"
77
license = { file = "LICENSE" }
8-
requires-python = ">= 3.12"
8+
requires-python = ">= 3.9"
99
classifiers = [
1010
"Development Status :: 4 - Beta",
1111
"Programming Language :: Python :: 3",
@@ -16,6 +16,7 @@ scripts = { sync_uv_pre_commit = "sync_uv_pre_commit.cli:main" }
1616
dependencies = [
1717
"pre-commit>=3.8.0",
1818
"toml>=0.10.2",
19+
"typing-extensions>=4.12.2",
1920
]
2021

2122
[tool.uv]

pyrightconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"typeCheckingMode": "strict",
3-
"pythonVersion": "3.12",
3+
"pythonVersion": "3.9",
44
"pythonPlatform": "Linux",
55
"reportMissingTypeStubs": false,
66
"reportInconsistentConstructor": false,

ruff.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
line-length = 88
22
unsafe-fixes = true
3-
target-version = "py312"
3+
target-version = "py39"
44

55
[lint]
66
select = ["ALL"]

src/sync_uv_pre_commit/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
from functools import lru_cache
1111
from itertools import chain
1212
from pathlib import Path
13-
from typing import TYPE_CHECKING, Any, NotRequired, Required, TypedDict
13+
from typing import TYPE_CHECKING, Any, TypedDict
1414

1515
from pre_commit.clientlib import InvalidConfigError, load_config
16+
from typing_extensions import NotRequired, Required
1617

1718
from sync_uv_pre_commit.log import ColorFormatter
1819
from sync_uv_pre_commit.toml import combine_dev_dependencies
@@ -174,7 +175,7 @@ def process(
174175
version = find_version_in_pyproject(
175176
arg["name"], pyproject, temp_directory, extras
176177
)
177-
version = f"{arg.get("prefix", "")}{version}{arg.get("suffix", "")}"
178+
version = f"{arg.get('prefix', '')}{version}{arg.get('suffix', '')}"
178179

179180
if hooks[arg["hook_id"]] == version:
180181
logger.info(

src/sync_uv_pre_commit/log.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from __future__ import annotations
22

33
import logging
4-
from typing import override
4+
5+
from typing_extensions import override
56

67
__all__ = []
78

0 commit comments

Comments
 (0)