
    AHj                     d   d dl m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mZmZmZmZmZmZmZmZmZmZmZmZmZmZ ddlmZ dd	lmZ dd
lm Z m!Z!m"Z"m#Z# ddl$m%Z% ddl&m'Z'm(Z(m)Z)m*Z*m+Z+ ddl,m-Z-m.Z.m/Z/m0Z0 ddl1m2Z2 ddl3m4Z4m5Z5m6Z6  ejn                  d      Z8de9dede*fdZ:de9dede*fdZ;y)    )metadata)Any   )
Collection)Config)ContextMockContext)AmbiguousEnvVarAuthFailureCollectionNotFoundCommandTimedOutExit
ParseErrorPlatformErrorResponseNotAcceptedSubprocessPipeErrorThreadExceptionUncastableEnvVarUnexpectedExitUnknownFileTypeUnpicklableConfigMemberWatcherError)Executor)FilesystemLoader)ArgumentParserParserContextParseResult)Program)FailureLocalPromiseResultRunner)CallTaskcalltask)pty_size)FailingResponder	ResponderStreamWatcherinvokecommandkwargsreturnc                 8     t               j                  | fi |S )a  
    Run ``command`` in a subprocess and return a `.Result` object.

    See `.Runner.run` for API details.

    .. note::
        This function is a convenience wrapper around Invoke's `.Context` and
        `.Runner` APIs.

        Specifically, it creates an anonymous `.Context` instance and calls its
        `~.Context.run` method, which in turn defaults to using a `.Local`
        runner subclass for command execution.

    .. versionadded:: 1.0
    )r   runr.   r/   s     G/root/tools/cai/cai_env/lib/python3.12/site-packages/invoke/__init__.pyr2   r2   $   s      79==+F++    c                 8     t               j                  | fi |S )a!  
    Run ``command`` in a ``sudo`` subprocess and return a `.Result` object.

    See `.Context.sudo` for API details, such as the ``password`` kwarg.

    .. note::
        This function is a convenience wrapper around Invoke's `.Context` and
        `.Runner` APIs.

        Specifically, it creates an anonymous `.Context` instance and calls its
        `~.Context.sudo` method, which in turn defaults to using a `.Local`
        runner subclass for command execution (plus sudo-related bits &
        pieces).

    .. versionadded:: 1.4
    )r   sudor3   s     r4   r7   r7   7   s    " 79>>',V,,r5   N)<	importlibr   typingr   
collectionr   configr   contextr   r	   
exceptionsr
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   executorr   loaderr   parserr   r   r   r   programr   runnersr    r!   r"   r#   r$   tasksr%   r&   r'   r(   	terminalsr)   watchersr*   r+   r,   version__version__strr2   r7    r5   r4   <module>rJ      s      "  )    "  $ @ @  < < ) )  @ @hx(, , , ,&-# - - -r5   