Skip to content

Commit c11aac2

Browse files
committed
Literal was added python 3.8
1 parent d8dc5c6 commit c11aac2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xarray/core/options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ class T_Options(TypedDict):
3131

3232
else:
3333
# See GH5624, this is a convoluted way to allow type-checking to use
34-
# `TypedDict` without requiring typing_extensions as a required dependency
35-
# to _run_ the code (it is required to type-check).
34+
# `TypedDict` and `Literal` without requiring typing_extensions as a
35+
# required dependency to _run_ the code (it is required to type-check).
3636
try:
37-
from typing import TYPE_CHECKING, Literal, Union
37+
from typing import TYPE_CHECKING, Union
3838

39-
from typing_extensions import TypedDict
39+
from typing_extensions import Literal, TypedDict
4040

4141
if TYPE_CHECKING:
4242
try:

0 commit comments

Comments
 (0)