Skip to content

Commit 32ee210

Browse files
committed
Harmonize type signature of Command.run()
1 parent 28e794e commit 32ee210

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

news/72740b33-68bd-4941-9389-88902734c398.trivial.rst

Whitespace-only changes.

src/pip/_internal/cli/base_command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88
import traceback
99
from optparse import Values
10-
from typing import Any, List, Optional, Tuple
10+
from typing import List, Optional, Tuple
1111

1212
from pip._internal.cli import cmdoptions
1313
from pip._internal.cli.command_context import CommandContextMixIn
@@ -85,7 +85,7 @@ def handle_pip_version_check(self, options: Values) -> None:
8585
# are present.
8686
assert not hasattr(options, "no_index")
8787

88-
def run(self, options: Values, args: List[Any]) -> int:
88+
def run(self, options: Values, args: List[str]) -> int:
8989
raise NotImplementedError
9090

9191
def parse_args(self, args: List[str]) -> Tuple[Values, List[str]]:

src/pip/_internal/commands/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def add_options(self) -> None:
4949

5050
self.parser.insert_option_group(0, self.cmd_opts)
5151

52-
def run(self, options: Values, args: List[Any]) -> int:
52+
def run(self, options: Values, args: List[str]) -> int:
5353
handlers = {
5454
"dir": self.get_cache_dir,
5555
"info": self.get_cache_info,

src/pip/_internal/commands/check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import logging
22
from optparse import Values
3-
from typing import Any, List
3+
from typing import List
44

55
from pip._internal.cli.base_command import Command
66
from pip._internal.cli.status_codes import ERROR, SUCCESS
@@ -19,7 +19,7 @@ class CheckCommand(Command):
1919
usage = """
2020
%prog [options]"""
2121

22-
def run(self, options: Values, args: List[Any]) -> int:
22+
def run(self, options: Values, args: List[str]) -> int:
2323

2424
package_set, parsing_probs = create_package_set_from_installed()
2525
missing, conflicting = check_package_set(package_set)

src/pip/_internal/commands/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def add_options(self) -> None:
4444
self.parser.insert_option_group(0, index_opts)
4545
self.parser.insert_option_group(0, self.cmd_opts)
4646

47-
def run(self, options: Values, args: List[Any]) -> int:
47+
def run(self, options: Values, args: List[str]) -> int:
4848
handlers = {
4949
"versions": self.get_available_package_versions,
5050
}

0 commit comments

Comments
 (0)