File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
src/pip/_internal/commands Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 2
2
Package containing all pip commands
3
3
"""
4
4
5
- # The following comment should be removed at some point in the future.
6
- # mypy: disallow-untyped-defs=False
7
-
8
5
from __future__ import absolute_import
9
6
10
7
import importlib
13
10
from pip ._internal .utils .typing import MYPY_CHECK_RUNNING
14
11
15
12
if MYPY_CHECK_RUNNING :
16
- from typing import Any
13
+ from typing import Any , Union , Sequence
17
14
from pip ._internal .cli .base_command import Command
18
15
19
16
@@ -101,6 +98,7 @@ def create_command(name, **kwargs):
101
98
102
99
103
100
def get_similar_commands (name ):
101
+ # type: (str) -> Union[bool, Sequence[str]]
104
102
"""Command name auto-correct."""
105
103
from difflib import get_close_matches
106
104
Original file line number Diff line number Diff line change 1
- # The following comment should be removed at some point in the future.
2
- # mypy: disallow-untyped-defs=False
3
-
4
1
import logging
5
2
6
3
from pip ._internal .cli .base_command import Command
9
6
create_package_set_from_installed ,
10
7
)
11
8
from pip ._internal .utils .misc import write_output
9
+ from pip ._internal .utils .typing import MYPY_CHECK_RUNNING
12
10
13
11
logger = logging .getLogger (__name__ )
14
12
13
+ if MYPY_CHECK_RUNNING :
14
+ from typing import List , Any
15
+ from optparse import Values
16
+
15
17
16
18
class CheckCommand (Command ):
17
19
"""Verify installed packages have compatible dependencies."""
@@ -20,6 +22,7 @@ class CheckCommand(Command):
20
22
%prog [options]"""
21
23
22
24
def run (self , options , args ):
25
+ # type: (Values, List[Any]) -> Any
23
26
package_set , parsing_probs = create_package_set_from_installed ()
24
27
missing , conflicting = check_package_set (package_set )
25
28
You can’t perform that action at this time.
0 commit comments