Skip to content

Commit

Permalink
some compatibility code
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Mar 14, 2021
1 parent 7c5a821 commit 56f8870
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pdm/_types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from typing import Dict, List, NamedTuple, Tuple, Union

try:
from typing import Literal
except ImportError:
from typing_extensions import Literal # noqa

Source = Dict[str, Union[str, bool]]
RequirementDict = Union[str, Dict[str, Union[bool, str]]]
CandidateInfo = Tuple[List[str], str, str]
Expand Down
3 changes: 2 additions & 1 deletion pdm/models/versions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import re
from typing import Any, Literal, Tuple, Union, overload
from typing import Any, Tuple, Union, overload

from pdm._types import Literal
from pdm.exceptions import InvalidPyVersion

VersionBit = Union[int, Literal["*"]]
Expand Down

0 comments on commit 56f8870

Please sign in to comment.