B
    Kkd                 @   s"  d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ erddlm Z m!Z! ddl"m#Z# eeee
eeeeeeeeegZ$dd e$D Z%dddZ&dd Z'dd Z(dS )z%
Package containing all pip commands
    )absolute_import)CompletionCommand)ConfigurationCommand)DownloadCommand)FreezeCommand)HashCommand)HelpCommand)ListCommand)CheckCommand)SearchCommand)ShowCommand)InstallCommand)UninstallCommand)WheelCommand)MYPY_CHECK_RUNNING)ListType)Commandc             C   s   i | ]}||j qS  )name).0cr   r   @/tmp/pip-install-gxxfd9b7/pip/pip/_internal/commands/__init__.py
<dictcomp>*   s    r   Tc             c   s:   | rt tt}nt }x|D ]\}}||jfV  qW dS )z5Yields sorted (command name, command summary) tuples.N)_sort_commandscommands_dictcommands_orderitemssummary)orderedcmditemsr   command_classr   r   r   get_summaries-   s
    r"   c             C   s6   ddl m} |  } || t }|r.|d S dS dS )zCommand name auto-correct.r   )get_close_matchesFN)difflibr#   lowerr   keys)r   r#   close_commandsr   r   r   get_similar_commands9   s    r(   c                s    fdd}t |  |dS )Nc                s(   y  | d S  tk
r"   dS X d S )N      )index
ValueError)key)orderr   r   keyfnH   s    z_sort_commands.<locals>.keyfn)r-   )sortedr   )cmddictr.   r/   r   )r.   r   r   G   s    r   N)T))__doc__
__future__r   !pip._internal.commands.completionr   $pip._internal.commands.configurationr   pip._internal.commands.downloadr   pip._internal.commands.freezer   pip._internal.commands.hashr   pip._internal.commands.helpr   pip._internal.commands.listr	   pip._internal.commands.checkr
   pip._internal.commands.searchr   pip._internal.commands.showr   pip._internal.commands.installr    pip._internal.commands.uninstallr   pip._internal.commands.wheelr   pip._internal.utils.typingr   typingr   r   pip._internal.cli.base_commandr   r   r   r"   r(   r   r   r   r   r   <module>   sF   
