Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
HelpCommand Class Reference
Inheritance diagram for HelpCommand:
Collaboration diagram for HelpCommand:

Public Member Functions

int run (self, Values options, List[str] args)
 
- Public Member Functions inherited from Command
None __init__ (self, str name, str summary, bool isolated=False)
 
None add_options (self)
 
None handle_pip_version_check (self, Values options)
 
Tuple[Values, List[str]] parse_args (self, List[str] args)
 
int main (self, List[str] args)
 
- Public Member Functions inherited from CommandContextMixIn
Generator[None, None, Nonemain_context (self)
 
_T enter_context (self, ContextManager[_T] context_provider)
 

Static Public Attributes

str usage
 
bool ignore_require_venv = True
 
- Static Public Attributes inherited from Command
str usage = ""
 
bool ignore_require_venv = False
 

Additional Inherited Members

- Data Fields inherited from Command
 name
 
 summary
 
 parser
 
 cmd_opts
 
 tempdir_registry
 
 verbosity
 
- Protected Member Functions inherited from Command
int _main (self, List[str] args)
 
- Protected Attributes inherited from CommandContextMixIn
 _in_main_context
 
 _main_context
 

Detailed Description

Show help for commands

Definition at line 9 of file help.py.

Member Function Documentation

◆ run()

int run (   self,
Values  options,
List[str]  args 
)

Reimplemented from Command.

Definition at line 16 of file help.py.

16 def run(self, options: Values, args: List[str]) -> int:
17 from pip._internal.commands import (
18 commands_dict,
19 create_command,
20 get_similar_commands,
21 )
22
23 try:
24 # 'pip help' with no args is handled by pip.__init__.parseopt()
25 cmd_name = args[0] # the command we need help for
26 except IndexError:
27 return SUCCESS
28
29 if cmd_name not in commands_dict:
30 guess = get_similar_commands(cmd_name)
31
32 msg = [f'unknown command "{cmd_name}"']
33 if guess:
34 msg.append(f'maybe you meant "{guess}"')
35
36 raise CommandError(" - ".join(msg))
37
38 command = create_command(cmd_name)
40
41 return SUCCESS
for i

References i.

Field Documentation

◆ ignore_require_venv

bool ignore_require_venv = True
static

Definition at line 14 of file help.py.

◆ usage

str usage
static
Initial value:
= """
%prog <command>"""

Definition at line 12 of file help.py.


The documentation for this class was generated from the following file: