관리-도구
편집 파일: parser.cpython-35.pyc
��Re% � @ s d Z d d l m Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z m Z d d l m Z e j e � Z Gd d � d e j � Z Gd d � d e � Z Gd d � d e j � Z Gd d � d e � Z d d � Z d S)zBase option parser setup� )�absolute_importN)� strtobool)�string_types)� UNKNOWN_ERROR)� Configuration�ConfigurationError)�get_terminal_sizec @ s| e Z d Z d Z d d � Z d d � Z d d d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d S)�PrettyHelpFormatterz4A prettier/less verbose help formatter for optparse.c O sC d | d <d | d <t � d d | d <t j j | | | � d S)N� �max_help_position� �indent_incrementr � �width)r �optparse�IndentedHelpFormatter�__init__)�self�args�kwargs� r ��/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/cli/parser.pyr s zPrettyHelpFormatter.__init__c C s | j | � S)N)�_format_option_strings)r �optionr r r �format_option_strings! s z)PrettyHelpFormatter.format_option_stringsz <{}>z, c C s� g } | j r# | j | j d � | j r@ | j | j d � t | � d k rb | j d | � | j � r� | j p� | j j � } | j | j | j � � � d j | � S)z� Return a comma-separated list of option strings and metavars. :param option: tuple of (short opt, long opt), e.g: ('-f', '--format') :param mvarfmt: metavar format string :param optsep: separator r r � )�_short_opts�append� _long_opts�len�insert�takes_value�metavar�dest�lower�format�join)r r �mvarfmt�optsep�optsr"