����JFIF���������
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
python27
/
lib
/
python2.7
/
site-packages
/
pip
/
_internal
/
cli
/
Filename :
autocompletion.pyc
back
Copy
� �Rec�����������@���s����d��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 �m �Z �d�d�l�m�Z�d�d�l �m�Z�e�r��d�d�l�m�Z�m�Z�m�Z�m�Z�n��d ����Z�d ����Z�d����Z�d�S(���sB���Logic that powers autocompletion installed by ``pip completion``. i����N(���t���chain(���t���create_main_parser(���t ���commands_dictt���create_command(���t���get_installed_distributions(���t���MYPY_CHECK_RUNNING(���t���Anyt���Iterablet���Listt���Optionalc����������C���s%��d�t��j�k�r�d�St��j�d�j����d�}��t�t��j�d���}�y�|��|�d�}�Wn�t�k �rh�d�}�n�Xt����}�t�t���}�g��}�d�}�x$�|��D]�}�|�|�k�r��|�}�Pq��q��W|�d�k �r*|�d�k�r��t �j �d���n��|�d�k�o��|�j�d ���}�|�r�g��} �|�j����} �xO�t �d�t���D]>�}�|�j�j�| ���r|�j�|��d�k�r| �j�|�j���qqW| �r�x�| �D]�}�|�GHqlWt �j �d���q�n��t�|���}�xZ�|�j�j�D]L�} �| �j�t�j�k�r�x1�| �j�| �j�D]�}�|�j�|�| �j�f���q�Wq�q�Wg��|��d�|�d�!D]�}�|�j�d���d �^�q }�g��|�D]$�\�}�}�|�|�k�r/|�|�f�^�q/}�g��|�D]'�\�}�}�|�j�|���r`|�|�f�^�q`}�t�|��|�|�j�j���}�|�r�t�|�|���}�g��|�D]�}�|�d �f�^�q�}�n��x5|�D]@�}�|�d �}�|�d�r|�d �d� d�k�r|�d�7}�n��|�GHq�Wn��g��|�j�D]�}�|�j�^�q4}�|�j�|�j���t�j�|���}�|�j�d ���r�xj�|�D]/�} �| �j�t�j�k�r~|�| �j�| �j�7}�q~q~Wn0�t�|��|�|���}�|�r�t�t�|�|�����}�n��d�j �g��|�D]�}�|�j�|���r�|�^�q���GHt �j �d���d�S(���s?���Entry Point for completion of main and subcommand options. t���PIP_AUTO_COMPLETENt ���COMP_WORDSi���t ���COMP_CWORDt����t���helpt���showt ���uninstallt���-t ���local_onlyt���=i����i���s���--t��� (���R���R���(!���t���ost���environt���splitt���intt ���IndexErrorR���t���listR���t���Nonet���syst���exitt ���startswitht���lowerR���t���Truet���keyt���appendR���t���parsert���option_list_allR���t���optparset ���SUPPRESS_HELPt ���_long_optst���_short_optst���nargst���get_path_completion_typet���auto_complete_pathst ���option_groupst���option_listR����t ���from_iterablet���join(���t���cwordst���cwordt���currentR#���t���subcommandst���optionst���subcommand_namet���wordt���should_list_installedt ���installedt���lct���distt ���subcommandt���optt���opt_strt���xt ���prev_optst���vt���kt���completion_typet���pathst���patht���optiont ���opt_labelt���it���optst���flattened_opts(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/autocompletion.pyt���autocomplete���s~���� % !114" 0c���������C���s����|�d�k��s$�|��|�d�j��d���r(�d�Sx��|�D]��}�|�j�t�j�k�rM�q/�n��xt�t�|���j�d���D]]�}�|��|�d�j�d���d�|�k�rc�|�j�s��t�d����|�j�j�d���D����r��|�j�Sqc�qc�Wq/�Wd�S(���sL��Get the type of path completion (``file``, ``dir``, ``path`` or None) :param cwords: same as the environmental variable ``COMP_WORDS`` :param cword: same as the environmental variable ``COMP_CWORD`` :param opts: The available options to check :return: path completion type (``file``, ``dir``, ``path`` or None) i���R���t���/R���i����c���������s���s���|��]�}�|�d�k�Vq�d�S(���RD���t���filet���dirN(���RD���RL���RM���(����(���t���.0R>���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/autocompletion.pys ���<genexpr>����s���N( ���R���R���R���R%���R&���t���strR���t���metavart���any(���R0���R1���RH���R<���t���o(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/autocompletion.pyR*���q���s���� $ ! c���������#���s��t��j�j�|����\�}����t��j�j�|���}�t��j�|�t��j���sC�d�St��j�j������������f�d����t��j�|���D��}�x��|�D]��}�t��j�j�|�|���}�t��j�j�t��j�j�|�|�����}�|�d�k�r��t��j�j �|���r��|�Vq{�t��j�j �|���r{�t��j�j�|�d���Vq{�q{�Wd�S(���so��If ``completion_type`` is ``file`` or ``path``, list all regular files and directories starting with ``current``; otherwise only list directories starting with ``current``. :param current: The word to be completed :param completion_type: path completion type(`file`, `path` or `dir`)i :return: A generator of regular files and/or directories Nc���������3���s0���|��]&�}�t��j�j�|���j������r�|�Vq�d��S(���N(���R���RD���t���normcaseR���(���RN���R>���(���t���filename(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/autocompletion.pys ���<genexpr>����s����RM���R ���(���R���RD���R���t���abspatht���accesst���R_OKRS���t���listdirR/���t���isfilet���isdir(���R2���RB���t ���directoryt���current_patht ���file_listt���fR<���t ���comp_file(����(���RT���s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/autocompletion.pyR+�������s���� !(���t���__doc__R%���R���R���t ���itertoolsR����t���pip._internal.cli.main_parserR���t���pip._internal.commandsR���R���t���pip._internal.utils.miscR���t���pip._internal.utils.typingR���t���typingR���R���R���R ���RJ���R*���R+���(����(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/autocompletion.pyt���<module>���s���% _