Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
news
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sartika Aritonang
news
Commits
2c5e02f2
Commit
2c5e02f2
authored
May 29, 2020
by
Sartika Aritonang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
51a2776c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
help.py
stbi/Lib/site-packages/pip/_internal/commands/help.py
+41
-0
No files found.
stbi/Lib/site-packages/pip/_internal/commands/help.py
0 → 100644
View file @
2c5e02f2
# The following comment should be removed at some point in the future.
# mypy: disallow-untyped-defs=False
from
__future__
import
absolute_import
from
pip._internal.cli.base_command
import
Command
from
pip._internal.cli.status_codes
import
SUCCESS
from
pip._internal.exceptions
import
CommandError
class
HelpCommand
(
Command
):
"""Show help for commands"""
usage
=
"""
%
prog <command>"""
ignore_require_venv
=
True
def
run
(
self
,
options
,
args
):
from
pip._internal.commands
import
(
commands_dict
,
create_command
,
get_similar_commands
,
)
try
:
# 'pip help' with no args is handled by pip.__init__.parseopt()
cmd_name
=
args
[
0
]
# the command we need help for
except
IndexError
:
return
SUCCESS
if
cmd_name
not
in
commands_dict
:
guess
=
get_similar_commands
(
cmd_name
)
msg
=
[
'unknown command "{}"'
.
format
(
cmd_name
)]
if
guess
:
msg
.
append
(
'maybe you meant "{}"'
.
format
(
guess
))
raise
CommandError
(
' - '
.
join
(
msg
))
command
=
create_command
(
cmd_name
)
command
.
parser
.
print_help
()
return
SUCCESS
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment