Skip to content

Commit 277d88e

Browse files
authored
Merge pull request #141 from maresb/fix/remove-typing-extensions-import
Avoid hard dependency on typing_extensions for Python >= 3.9
2 parents fb21ae8 + fdedaec commit 277d88e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies = [
2323
"PyQt6",
2424
"darkdetect",
2525
"typer>=0.16.0",
26+
"typing_extensions>=3.7.4; python_version<'3.9'",
2627
]
2728
classifiers = [
2829
"Operating System :: POSIX :: Linux",

src/labelle/cli/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
import typer
1414
from rich.console import Console
1515
from rich.table import Table
16-
from typing_extensions import Annotated
16+
17+
if sys.version_info >= (3, 9):
18+
from typing import Annotated
19+
else:
20+
from typing_extensions import Annotated
1721

1822
from labelle import __version__
1923
from labelle.lib.constants import (

0 commit comments

Comments
 (0)