Skip to content

Commit 6b0c4d6

Browse files
committed
Rollback rich utils
1 parent df102c9 commit 6b0c4d6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

typer/rich_utils.py

Lines changed: 6 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
@@ -22,9 +23,13 @@
2223
from rich.text import Text
2324
from rich.theme import Theme
2425
from rich.traceback import Traceback
25-
from typer._typing import Literal
2626
from typer.models import DeveloperExceptionConfig
2727

28+
if sys.version_info >= (3, 9):
29+
from typing import Literal
30+
else:
31+
from typing_extensions import Literal
32+
2833
# Default styles
2934
STYLE_OPTION = "bold cyan"
3035
STYLE_SWITCH = "bold green"

0 commit comments

Comments
 (0)