
    VhP                    L    d Z ddlmZ ddlZddlmZ ddlmZ ddZdd	Z	dd
Z
y)z$Completers for use with argcomplete.    )annotationsN   )find_target_completion   )OptionCompletionFinderc                    t        |j                  || j                        }| j                  xr t        |      dkD  | _        |S )zKPerform completion for the targets configured for the command being parsed.r   )r   targets_func	list_modelendisable_completion_mangling)	completerprefixparsed_args_matchess        U/home/dcms/DCMS/lib/python3.12/site-packages/ansible_test/_internal/cli/completers.pycomplete_targetr      s>    $[%=%=vyGZGZ[G,5,?,?,TCLSTDTI)N    c                R    | D cg c]  }|j                  |      s| }}|S c c}w )z.Perform completion using the provided choices.)
startswith)choicesr   r   choicer   s        r   complete_choicesr      s-    $+I&v/@/@/HvIGIN Js   $$c                    || _         y)z7Register the given completer with the specified action.N)r   )actionr   s     r   register_completerr      s
     Fr   )r   r   r   strr   zargparse.Namespacereturn	list[str])r   r   r   r   r   r   )r   zargparse.Actionr   None)__doc__
__future__r   argparsetargetr   argparsing.argcompletionr   r   r   r    r   r   <module>r'      s'    * " 
!r   