提交 b01eb958 编写于 作者: D Devesh Kumar Singh

Fix run type annotation in base_command and configuration

上级 fe76a122
......@@ -105,7 +105,7 @@ class Command(CommandContextMixIn):
assert not hasattr(options, 'no_index')
def run(self, options, args):
# type: (Values, List[Any]) -> Any
# type: (Values, List[Any]) -> int
raise NotImplementedError
def parse_args(self, args):
......
......@@ -14,6 +14,11 @@ from pip._internal.configuration import (
)
from pip._internal.exceptions import PipError
from pip._internal.utils.misc import get_prog, write_output
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
if MYPY_CHECK_RUNNING:
from typing import List
from optparse import Values
logger = logging.getLogger(__name__)
......@@ -92,6 +97,7 @@ class ConfigurationCommand(Command):
self.parser.insert_option_group(0, self.cmd_opts)
def run(self, options, args):
# type: (Values, List[str]) -> int
handlers = {
"list": self.list_values,
"edit": self.open_in_editor,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册