Skip to content

Commit c17e657

Browse files
authored
Merge pull request #57 from kcroker/hotfix/typing_extensions
Import @OverRide from typing_extensions conditionally
2 parents 2da63d2 + a0a2193 commit c17e657

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## Unreleased
9+
10+
* Import `@override` from `typing_extensions` conditionally.
11+
812
## 2.6.3 - 2026-05-07
913

1014
* Add an "ocr" extra.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencies = [
1313
"djvulibre-python (>=0.9.3)",
1414
"fpdf2 (>=2.8)",
1515
"loguru (>=0.7)",
16+
"typing_extensions (>=4.5.0); python_version < '3.12'",
1617
"pdfrw (>=0.4)",
1718
"pillow (>=12.2.0)",
1819
]

src/dpsprep/options.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import json
2+
import sys
23
from collections.abc import Iterator, Mapping
34
from dataclasses import dataclass
45
from typing import Any, Literal, cast, get_args
56

67
import click
7-
from typing_extensions import override
8+
9+
10+
if sys.version_info < (3, 12):
11+
from typing_extensions import override
12+
else:
13+
from typing import override
814

915
from dpsprep.exceptions import DpsPrepConfigError
1016
from dpsprep.ranges import (

uv.lock

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

0 commit comments

Comments
 (0)