diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2021-01-01 15:16:16 -0800 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2021-02-18 19:09:13 -0800 |
commit | a6392bd62e7d3b13698c4a4df64e5f51a5c67b9d (patch) | |
tree | ce6be9c52903db89adafc11af298cd26eee63716 /src/pip/_internal/distributions/__init__.py | |
parent | f7b5586e71f6c5721bedd801eb5ec862fe7d8917 (diff) | |
download | pip-a6392bd62e7d3b13698c4a4df64e5f51a5c67b9d.tar.gz |
Replace pip._internal.utils.typing with stdlib typing
The stdlib module has been available since Python 3.5 and the
TYPE_CHECKING constant has been available since 3.5.2.
By using stdlib, this removes the need for pip to maintain its own
Python 2 typing compatibility shim.
Diffstat (limited to 'src/pip/_internal/distributions/__init__.py')
-rw-r--r-- | src/pip/_internal/distributions/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pip/_internal/distributions/__init__.py b/src/pip/_internal/distributions/__init__.py index d5c1afc5b..d68f358e2 100644 --- a/src/pip/_internal/distributions/__init__.py +++ b/src/pip/_internal/distributions/__init__.py @@ -1,8 +1,9 @@ +from typing import TYPE_CHECKING + from pip._internal.distributions.sdist import SourceDistribution from pip._internal.distributions.wheel import WheelDistribution -from pip._internal.utils.typing import MYPY_CHECK_RUNNING -if MYPY_CHECK_RUNNING: +if TYPE_CHECKING: from pip._internal.distributions.base import AbstractDistribution from pip._internal.req.req_install import InstallRequirement |