Skip to content

Commit 0e63bb4

Browse files
committed
Restore rich_utils
1 parent 6f16a92 commit 0e63bb4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

typer/rich_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import inspect
44
import io
5+
import sys
56
from collections import defaultdict
67
from gettext import gettext as _
78
from os import getenv
@@ -21,7 +22,10 @@
2122
from rich.text import Text
2223
from rich.theme import Theme
2324

24-
from ._typing import Literal
25+
if sys.version_info >= (3, 9):
26+
from typing import Literal
27+
else:
28+
from typing_extensions import Literal
2529

2630
# Default styles
2731
STYLE_OPTION = "bold cyan"

0 commit comments

Comments
 (0)