Skip to content

Commit

Permalink
fixup! Fix: include sub-actions in tab completion
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhughes934 committed Jan 3, 2025
1 parent 02e0fc2 commit 78f19ec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/pip/_internal/cli/base_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import sys
import traceback
from optparse import Values
from typing import Callable, List, Optional, Tuple
from typing import Callable, Dict, List, Optional, Tuple

from pip._vendor.rich import reconfigure
from pip._vendor.rich import traceback as rich_traceback
Expand Down Expand Up @@ -230,7 +230,7 @@ def _main(self, args: List[str]) -> int:

return self._run_wrapper(level_number, options, args)

def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
def handler_map(self) -> Dict[str, Callable[[Values, List[str]], None]]:
"""
map of names to handler actions for commands with sub-actions
"""
Expand Down
4 changes: 2 additions & 2 deletions src/pip/_internal/commands/cache.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import textwrap
from optparse import Values
from typing import Callable, List
from typing import Callable, Dict, List

from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import ERROR, SUCCESS
Expand Down Expand Up @@ -49,7 +49,7 @@ def add_options(self) -> None:

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

def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
def handler_map(self) -> Dict[str, Callable[[Values, List[str]], None]]:
return {
"dir": self.get_cache_dir,
"info": self.get_cache_info,
Expand Down
4 changes: 2 additions & 2 deletions src/pip/_internal/commands/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import subprocess
from optparse import Values
from typing import Any, Callable, List, Optional
from typing import Any, Callable, Dict, List, Optional

from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import ERROR, SUCCESS
Expand Down Expand Up @@ -93,7 +93,7 @@ def add_options(self) -> None:

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

def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
def handler_map(self) -> Dict[str, Callable[[Values, List[str]], None]]:
return {
"list": self.list_values,
"edit": self.open_in_editor,
Expand Down
4 changes: 2 additions & 2 deletions src/pip/_internal/commands/index.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
from optparse import Values
from typing import Any, Callable, Iterable, List, Optional
from typing import Any, Callable, Dict, Iterable, List, Optional

from pip._vendor.packaging.version import Version

Expand Down Expand Up @@ -45,7 +45,7 @@ def add_options(self) -> None:
self.parser.insert_option_group(0, index_opts)
self.parser.insert_option_group(0, self.cmd_opts)

def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
def handler_map(self) -> Dict[str, Callable[[Values, List[str]], None]]:
return {
"versions": self.get_available_package_versions,
}
Expand Down

0 comments on commit 78f19ec

Please sign in to comment.