diff options
| author | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
|---|---|---|
| committer | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
| commit | 227b2d30a8675b44918f9d9ca89b24144a938215 (patch) | |
| tree | 9f8e6a28724514b6fdf463a9ab2067a7ef309b72 /venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/commands/help.py | |
| parent | 842a8cfbbbdb1f92889d892e4859dbd5d40c5be8 (diff) | |
removing venv files
Diffstat (limited to 'venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/commands/help.py')
| -rw-r--r-- | venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/commands/help.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/commands/help.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/commands/help.py deleted file mode 100644 index f4a0e40..0000000 --- a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/commands/help.py +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | from __future__ import absolute_import | ||
| 2 | |||
| 3 | from pip._internal.basecommand import SUCCESS, Command | ||
| 4 | from pip._internal.exceptions import CommandError | ||
| 5 | |||
| 6 | |||
| 7 | class HelpCommand(Command): | ||
| 8 | """Show help for commands""" | ||
| 9 | name = 'help' | ||
| 10 | usage = """ | ||
| 11 | %prog <command>""" | ||
| 12 | summary = 'Show help for commands.' | ||
| 13 | ignore_require_venv = True | ||
| 14 | |||
| 15 | def run(self, options, args): | ||
| 16 | from pip._internal.commands import commands_dict, get_similar_commands | ||
| 17 | |||
| 18 | try: | ||
| 19 | # 'pip help' with no args is handled by pip.__init__.parseopt() | ||
| 20 | cmd_name = args[0] # the command we need help for | ||
| 21 | except IndexError: | ||
| 22 | return SUCCESS | ||
| 23 | |||
| 24 | if cmd_name not in commands_dict: | ||
| 25 | guess = get_similar_commands(cmd_name) | ||
| 26 | |||
| 27 | msg = ['unknown command "%s"' % cmd_name] | ||
| 28 | if guess: | ||
| 29 | msg.append('maybe you meant "%s"' % guess) | ||
| 30 | |||
| 31 | raise CommandError(' - '.join(msg)) | ||
| 32 | |||
| 33 | command = commands_dict[cmd_name]() | ||
| 34 | command.parser.print_help() | ||
| 35 | |||
| 36 | return SUCCESS | ||
