We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df102c9 commit 6b0c4d6Copy full SHA for 6b0c4d6
typer/rich_utils.py
@@ -2,6 +2,7 @@
2
3
import inspect
4
import io
5
+import sys
6
from collections import defaultdict
7
from gettext import gettext as _
8
from os import getenv
@@ -22,9 +23,13 @@
22
23
from rich.text import Text
24
from rich.theme import Theme
25
from rich.traceback import Traceback
-from typer._typing import Literal
26
from typer.models import DeveloperExceptionConfig
27
28
+if sys.version_info >= (3, 9):
29
+ from typing import Literal
30
+else:
31
+ from typing_extensions import Literal
32
+
33
# Default styles
34
STYLE_OPTION = "bold cyan"
35
STYLE_SWITCH = "bold green"
0 commit comments