ó
    EñiÀ  ã                  ó  • % S r SSKJr  SSKrSSKJr  SSKrSSKrSSKJr   " S S5      r	\R                  R                  S5      (       a   SSKr\	" 5       rS
\S'   SS jrgSS jrSrg! \ a    \R                  " S	5         N4f = f)a»  Allow bash-completion for argparse with argcomplete if installed.

Needs argcomplete>=0.5.6 for python 3.2/3.3 (older versions fail
to find the magic string, so _ARGCOMPLETE env. var is never set, and
this does not need special code).

Function try_argcomplete(parser) should be called directly before
the call to ArgumentParser.parse_args().

The filescompleter is what you normally would use on the positional
arguments specification, in order to get "dirname/" after "dirn<TAB>"
instead of the default "dirname ":

   optparser.add_argument(Config._file_or_dir, nargs='*').completer=filescompleter

Other, application specific, completers should go in the file
doing the add_argument calls as they need to be specified as .completer
attributes as well. (If argcomplete is not installed, the function the
attribute points to will not be used).

SPEEDUP
=======

The generic argcomplete script for bash-completion
(/etc/bash_completion.d/python-argcomplete.sh)
uses a python program to determine startup script generated by pip.
You can speed up completion somewhat by changing this script to include
  # PYTHON_ARGCOMPLETE_OK
so the python-argcomplete-check-easy-install-script does not
need to be called to find the entry point of the code and see if that is
marked  with PYTHON_ARGCOMPLETE_OK.

INSTALL/DEBUGGING
=================

To include this support in another application that has setup.py generated
scripts:

- Add the line:
    # PYTHON_ARGCOMPLETE_OK
  near the top of the main python entry point.

- Include in the file calling parse_args():
    from _argcomplete import try_argcomplete, filescompleter
  Call try_argcomplete just before parse_args(), and optionally add
  filescompleter to the positional arguments' add_argument().

If things do not work right away:

- Switch on argcomplete debugging with (also helpful when doing custom
  completers):
    export _ARC_DEBUG=1

- Run:
    python-argcomplete-check-easy-install-script $(which appname)
    echo $?
  will echo 0 if the magic line has been found, 1 if not.

- Sometimes it helps to find early on errors using:
    _ARGCOMPLETE=1 _ARC_DEBUG=1 appname
  which should throw a KeyError: 'COMPLINE' (which is properly set by the
  global argcomplete script).
é    )ÚannotationsN)Úglob)ÚAnyc                  ó0   • \ rS rSrSrSSS jjrS	S jrSrg)
ÚFastFilesCompleteréJ   zFast file completer class.c                ó   • Xl         g ©N©Údirectories)Úselfr   s     ÚQ/home/mande/repo/quber/.venv/lib/python3.13/site-packages/_pytest/_argcomplete.pyÚ__init__ÚFastFilesCompleter.__init__M   s   € Ø&Õó    c                ó  • [         R                  USS  ;   a:  [        [         R                  R	                  U5      [         R                  -   5      nOSn/ n/ nSU;  aF  SU;  a@  U(       a  US   [         R                  :X  a  UR                  [        US-   5      5        US-  nUR                  [        U5      5        [        U5       H?  n[         R                  R                  U5      (       a  US-  nUR                  XcS  5        MA     U$ )Né   r   Ú*Ú?éÿÿÿÿz.*Ú/)
ÚosÚsepÚlenÚpathÚdirnameÚextendr   ÚsortedÚisdirÚappend)r   ÚprefixÚkwargsÚ
prefix_dirÚ
completionÚglobbedÚxs          r   Ú__call__ÚFastFilesCompleter.__call__P   sÖ   € ä�6‰6�V˜A˜B�ZÓÜœRŸW™WŸ_™_¨VÓ4´r·v±vÑ=Ó>‰JàˆJØˆ
ØˆØ�fÓ ¨FÓ!2æ˜V B™Z¬2¯6©6Ó1Ø—‘œt F¨T¡MÓ2Ô3Ø�c‰MˆFØ�‰”t˜F“|Ô$Ü˜–ˆAÜ�w‰w�}‰}˜Q×ÑØ�S‘�à×Ñ˜a ˜nÖ-ñ	 !ð
 Ðr   r   N)T)r   ÚboolÚreturnÚNone)r!   Ústrr"   r   r*   z	list[str])Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r'   Ú__static_attributes__© r   r   r   r   J   s   † Ù$ö'÷r   r   Ú_ARGCOMPLETEr   zFastFilesCompleter | NoneÚfilescompleterc                ó.   • [         R                  " U SS9  g )NF)Úalways_complete_options)ÚargcompleteÚautocomplete©Úparsers    r   Útry_argcompleter<   m   s   € Ü× Ò  ÀÓGr   c                ó   • g r
   r3   r:   s    r   r<   r<   r   s   € Ør   )r;   zargparse.ArgumentParserr*   r+   )r1   Ú
__future__r   Úargparser   r   ÚsysÚtypingr   r   ÚenvironÚgetÚargcomplete.completersr8   ÚImportErrorÚexitr5   Ú__annotations__r<   r3   r   r   Ú<module>rH      s…   ðò>õ@ #ã Ý Û 	Û 
Ý ÷ñ ð8 ‡:�:‡>�>�.×!Ñ!ðÛ%ñ 1CÓ0D€NÐ-ÓDõHô
ð �Nøð ó Ø�Š�Žðús   ÁA+ Á+BÂB