403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pip/_internal/cli/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pip/_internal/cli/__pycache__/parser.cpython-311.pyc
�

�/�cA*��*�dZddlZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZm
Z
ddlmZddlmZmZddlmZmZeje��ZGd�d	ej��ZGd
�de��ZGd�d
ej��ZGd�de��ZdS)zBase option parser setup�N)�suppress)�Any�Dict�	Generator�List�Tuple)�
UNKNOWN_ERROR)�
Configuration�ConfigurationError)�redact_auth_from_url�	strtoboolc	����eZdZdZdededdf�fd�Zdejdefd�Z		ddejdededefd
�Z
dedefd�Zdedefd�Zdedefd�Z
dedefd�Zdededefd�Z�xZS)�PrettyHelpFormatterz4A prettier/less verbose help formatter for optparse.�args�kwargs�returnNc���d|d<d|d<tj��ddz
|d<t��j|i|��dS)N��max_help_position��indent_incrementr��width)�shutil�get_terminal_size�super�__init__)�selfrr�	__class__s   ��:/usr/lib/python3/dist-packages/pip/_internal/cli/parser.pyrzPrettyHelpFormatter.__init__sW���&(��"�#�%&��!�"� �2�4�4�Q�7�!�;��w�������$�)�&�)�)�)�)�)��optionc�,�|�|��S�N)�_format_option_strings)rr"s  r �format_option_stringsz)PrettyHelpFormatter.format_option_stringss���*�*�6�2�2�2r!� <{}>�, �mvarfmt�optsepc��g}|jr |�|jd��|jr |�|jd��t|��dkr|�d|��|���rc|j�J�|jp|j���}|�|�	|�������d�
|��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
        rrN�)�_short_opts�append�
_long_opts�len�insert�takes_value�dest�metavar�lower�format�join)rr"r)r*�optsr4s      r r%z*PrettyHelpFormatter._format_option_stringss�������	/��K�K��*�1�-�.�.�.���	.��K�K��)�!�,�-�-�-��t�9�9�q�=�=��K�K��6�"�"�"������	9��;�*�*�*��n�;���(9�(9�(;�(;�G��K�K����w�}�}���7�7�8�8�8��w�w�t�}�}�r!�headingc��|dkrdS|dzS)N�Optionsr,�:
�)rr9s  r �format_headingz"PrettyHelpFormatter.format_heading9s���i����2����r!�usagec�|�d�|�tj|��d����}|S)zz
        Ensure there is only one newline between usage and the first heading
        if there is no description.
        z
Usage: {}
�  )r6�indent_lines�textwrap�dedent)rr?�msgs   r �format_usagez PrettyHelpFormatter.format_usage>s6��
�$�$�T�%6�%6�x��u�7M�7M�t�%T�%T�U�U���
r!�descriptionc���|rut|jd��rd}nd}|�d��}|���}|�tj|��d��}|�d|�d�}|SdS)N�main�Commands�Description�
rAr<r,)�hasattr�parser�lstrip�rstriprBrCrD)rrG�labels   r �format_descriptionz&PrettyHelpFormatter.format_descriptionFs����	��t�{�F�+�+�
&�"���%��%�,�,�T�2�2�K�%�,�,�.�.�K��+�+�H�O�K�,H�,H�$�O�O�K�"�6�6�{�6�6�6�K����2r!�epilogc��|r|SdS)Nr,r=)rrSs  r �
format_epilogz!PrettyHelpFormatter.format_epilogXs���	��M��2r!�text�indentc�p���fd�|�d��D��}d�|��S)Nc���g|]}�|z��Sr=r=)�.0�linerWs  �r �
<listcomp>z4PrettyHelpFormatter.indent_lines.<locals>.<listcomp>`s���@�@�@�t�V�d�]�@�@�@r!rL)�splitr7)rrVrW�	new_liness  ` r rBz PrettyHelpFormatter.indent_lines_s:���@�@�@�@�t�z�z�$�/?�/?�@�@�@�	��y�y��#�#�#r!)r'r()�__name__�
__module__�__qualname__�__doc__rr�optparse�Option�strr&r%r>rFrRrUrB�
__classcell__�rs@r rrso�������>�>�*�c�*�S�*�T�*�*�*�*�*�*�3�H�O�3��3�3�3�3�NR����o��03��GJ��	�����4�c��c�����
�#��#������c��c�����$�C��C�����$��$�c�$�c�$�$�$�$�$�$�$�$r!rc�6��eZdZdZdejdef�fd�Z�xZS)�UpdatingDefaultsHelpFormatterz�Custom help formatter for use in ConfigOptionParser.

    This is updates the defaults before expanding them, allowing
    them to show up correctly in the help listing.

    Also redact auth from url type options
    r"rc���d}|j�mt|jt��sJ�|j�|jj��|j�J�|jj�|j��}t���|��}|rb|j	dkrWt|t��r|g}t|t��sg}|D]%}|�|t|����}�&|S)N�URL)rN�
isinstance�ConfigOptionParser�_update_defaults�defaultsr3�getr�expand_defaultr4re�list�replacer)rr"�default_values�	help_text�valrs     �r rqz,UpdatingDefaultsHelpFormatter.expand_defaultms������;�"��d�k�+=�>�>�>�>�>��K�(�(���)=�>�>�>��;�*�*�*�!�[�1�5�5�f�k�B�B�N��G�G�*�*�6�2�2�	��		N�f�n��5�5��.�#�.�.�
2�"0�!1���n�d�3�3�
$�!#��%�
N�
N��%�-�-�c�3G��3L�3L�M�M�	�	��r!)	r_r`rarbrcrdrerqrfrgs@r riridsW����������X�_������������r!ric�b�eZdZdedededejfd�Zede	ej
fd���ZdS)�CustomOptionParser�idxrrrc��|j|i|��}|j���|j�||��|S)z*Insert an OptionGroup at a given position.)�add_option_group�
option_groups�popr1)rryrr�groups     r �insert_option_groupz&CustomOptionParser.insert_option_group�sN��&��%�t�6�v�6�6������ � � ���!�!�#�u�-�-�-��r!c�l�|jdd�}|jD]}|�|j���|S)z<Get a list of all options, including those in option groups.N)�option_listr|�extend)r�res�is   r �option_list_allz"CustomOptionParser.option_list_all�sC����q�q�q�!���#�	&�	&�A��J�J�q�}�%�%�%�%��
r!N)r_r`ra�intrrc�OptionGroupr�propertyrrdr�r=r!r rxrx�sy������	��	�"�	�.1�	�	�	�	�	�	�	����h�o�!6�����X���r!rxc����eZdZdZdd�dededededd	f
�fd
�Zdej	ded
edefd�Z
deeeefd	d	ffd�Z
deeefdeeeffd�Zdejfd�Zdedd	fd�Z�xZS)rmzsCustom option parser which updates its defaults by checking the
    configuration files and environmental variablesF)�isolatedr�namer�rrNc���||_t|��|_|jsJ�t��j|i|��dSr$)r�r
�configrr)rr�r�rrrs     �r rzConfigOptionParser.__init__�sK�����	�#�H�-�-����y���������$�)�&�)�)�)�)�)r!r"�keyrvc��	|�||��S#tj$r1}td|����t	jd��Yd}~dSd}~wwxYw)Nz(An error occurred during configuration: �)�check_valuerc�OptionValueError�print�sys�exit)rr"r�rv�excs     r �
check_defaultz ConfigOptionParser.check_default�so��	��%�%�c�3�/�/�/���(�	�	�	��B�S�B�B�C�C�C��H�Q�K�K�K�K�K�K�K�K�K�����	���s��A�&A�Ac#�VK�d|jdg}d�|D��}|j���D]]\}}|st�d|���#|�dd��\}}||vr||�||f���^|D]}||D]\}}||fV���dS)N�globalz:env:c��i|]}|g��Sr=r=)rZr�s  r �
<dictcomp>zGConfigOptionParser._get_ordered_configuration_items.<locals>.<dictcomp>�s'��;
�;
�;
��D�"�;
�;
�;
r!z7Ignoring configuration key '%s' as it's value is empty.�.r)r�r��items�logger�debugr]r.)r�override_order�
section_items�section_keyrv�sectionr�s       r � _get_ordered_configuration_itemsz3ConfigOptionParser._get_ordered_configuration_items�s
����#�D�I�w�7��;
�;
�!/�;
�;
�;
�
�!%�� 1� 1� 3� 3�	:�	:��K���
����M������&�,�,�S�!�4�4�L�G�S��.�(�(��g�&�-�-�s�C�j�9�9�9��&�	�	�G�)�'�2�
�
���S��3�h�����
�	�	r!roc�����tj�j���_t	��}����D�]\�}��d�z������!�j�J��jdvrL	t|��}�n�#t$r-��d�|�����Y�n�wxYw�jdkr�tt��5t|��}ddd��n#1swxYwYtt��5t|��}ddd��n#1swxYwYt|t��r|dkr)��d�|�����nƉjdkr%|���}���fd	�|D��}n��jd
krt�j�J�|��j������}��||��}�jpd}�jpi}�j�||�g|�Ri|��n����|��}||�j<��|D]�t1�j���|�<�d�_|S)z�Updates the given defaults with values from the config files and
        the environ. Does a little special handling for certain types of
        options (lists).z--N)�
store_true�store_falsezm{} is not a valid value for {} option, please specify a boolean value like yes/no, true/false or 1/0 instead.�countrz�{} is not a valid value for {} option, please instead specify either a non-negative integer or a boolean value like yes/no or false/true which is equivalent to 1/0.r.c�>��g|]}����|����Sr=)r�)rZ�vr�r"rs  ���r r\z7ConfigOptionParser._update_defaults.<locals>.<listcomp>�s+���G�G�G�a�t�)�)�&�#�q�9�9�G�G�Gr!�callbackr=)rc�Valuesro�values�setr��
get_optionr3�actionr
�
ValueError�errorr6rr�rlr]r��add�get_opt_string�
convert_value�
callback_args�callback_kwargsr��getattr)	rro�	late_evalrv�opt_strrrr�r"s	`      @@r rnz#ConfigOptionParser._update_defaults�s?������o�d�m�4�4����E�E�	��=�=�?�?�0	(�0	(�H�C���_�_�T�C�Z�0�0�F�
�~���;�*�*�*��}� =�=�=��#�C�.�.�C�C��!�����J�J�5�5;�V�C��5E�5E������������'�)�)��j�)�)�)�)�#�C�.�.�C�)�)�)�)�)�)�)�)�)�)�)����)�)�)�)��j�)�)�#�#��c�(�(�C�#�#�#�#�#�#�#�#�#�#�#����#�#�#�#�!�#�s�+�+��s�Q�w�w��J�J�6�7=�f�S�#�6F�6F�	������(�*�*��i�i�k�k��G�G�G�G�G�G�3�G�G�G�����*�,�,���2�2�2��
�
�f�k�*�*�*� �/�/�1�1���*�*�7�C�8�8���+�1�r���/�5�2��������d�L�T�L�L�L�V�L�L�L�L��(�(���c�:�:��$'�H�V�[�!�!��	6�	6�C�#�D�K��5�5�H�S�M�M�����s6�8B	�	3C�?C�"C>�>D	�D	�D9�9D=	�D=	c�x�|jstj|j��S	|j���n?#t$r2}|�tt|����Yd}~nd}~wwxYw|�
|j�����}|���D]l}|j
�J�|�|j
��}t|t��r2|���}|�||��||j
<�mtj|��S)z�Overriding to make updating the defaults after instantiation of
        the option parser possible, _update_defaults() does the dirty work.N)�process_default_valuesrcr�ror��loadrr�r	rern�copy�_get_all_optionsr3rprlr�r�)r�errror"�defaultr�s      r �get_default_valuesz%ConfigOptionParser.get_default_valuess7���*�	2��?�4�=�1�1�1�	/��K��������!�	/�	/�	/��I�I�m�S��X�X�.�.�.�.�.�.�.�.�����	/�����(�(���);�);�)=�)=�>�>���+�+�-�-�	M�	M�F��;�*�*�*��l�l�6�;�/�/�G��'�3�'�'�
M� �/�/�1�1��(.�(:�(:�7�G�(L�(L����%����x�(�(�(s�<�
A8�(A3�3A8rEc��|�tj��|�t|�d���dS)NrL)�print_usager��stderrr�r	)rrEs  r r�zConfigOptionParser.error$s8�������$�$�$��	�	�-�C����,�,�,�,�,r!)r_r`rarbrre�boolrrcrdr�rrr�rrnr�r�r�rfrgs@r rmrm�sZ�������7�7��	*�*�*��*��*��	*�
�*�
�
*�*�*�*�*�*��H�O��#��C��C������	�5��c��?�D�$�.�	/�����8>��c�3�h��>�D��c��N�>�>�>�>�@)�H�O�)�)�)�)�,-��-��-�-�-�-�-�-�-�-r!rm)rb�loggingrcrr�rC�
contextlibr�typingrrrrr�pip._internal.cli.status_codesr	�pip._internal.configurationr
r�pip._internal.utils.miscrr
�	getLoggerr_r��IndentedHelpFormatterrri�OptionParserrxrmr=r!r �<module>r�s�������������
�
�
�
�
�
�
�
�����������4�4�4�4�4�4�4�4�4�4�4�4�4�4�8�8�8�8�8�8�I�I�I�I�I�I�I�I�D�D�D�D�D�D�D�D�	��	�8�	$�	$��O$�O$�O$�O$�O$�(�8�O$�O$�O$�d�����$7����@������.����,L-�L-�L-�L-�L-�+�L-�L-�L-�L-�L-r!

Youez - 2016 - github.com/yon3zu
LinuXploit