+
    Q(i                     R   ^ RI t ^ RIt^ RIHtHt ^ RIHt ^ RIHtH	t	H
t
HtHt ^ RIHt ]P                  R8  d   ^ RIHt M^ RIHt ]'       d   ^ RIHs ]! R4      tRsRR	 R
 llt]R R l4       t]R R l4       t]RR/R R ll4       t]RR/R R ll4       tRR/R R lltR# )    N)Callable	Coroutine)partial)TYPE_CHECKINGAnyLiteralTypeVaroverloadResultAction)assert_neverAppVc                l    V ^8  d   QhR\         R\        P                  R,          R\        R,          /# )   commandboundNbackend)asynciotrio)r   inspectBoundArgumentsr   )formats   "S/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/cyclopts/_run.py__annotate__r      s7     , ,,!!D(, &',    c                   \         P                  ! V 4      '       g(   Vf   V ! 4       # V ! VP                  / VP                  B # VR8X  dJ   ^ RIpVf   VP                  V ! 4       4      # VP                  V ! VP                  / VP                  B 4      # VR8X  dL   ^ RIpVf   VP                  V 4      # VP                  \        V .VP                  O5/ VP                  B 4      # \        V4       R# )a  Run a command, handling both sync and async cases.

If the command is async, an async context will be created to run it.

Parameters
----------
command : Callable
    The command to execute.
bound : inspect.BoundArguments | None
    Bound arguments for the command. If None, command is called with no arguments.
backend : Literal["asyncio", "trio"]
    The async backend to use if the command is async.

Returns
-------
return_value: Any
    The value the command function returns.
Nr   r   )	r   iscoroutinefunctionargskwargsr   runr   r   r   )r   r   r   r   r   s   &&&  r   _run_maybe_async_commandr#      s    . &&w//=9EJJ7%,,77)=;;wy));;w

CellCDD	F	=88G$$88GGIejjIELLIJJWr   c                    V ^8  d   QhR\         R\        RR\        3,          3,          R\        R,          R\        /# )r   callable.Nresult_actionreturn_valuereturn)r   r   r   r   )r   s   "r   r   r   G   s4     r r(3	$a- 889 rPWXfPg rlm rr   c                   R # N r%   r&   s   "$r   r"   r"   F   s    orr   c                d    V ^8  d   QhR\         R\        3,          R\        R,          R\        /# )r   r%   .r&   r'   r(   )r   r   r   )r   s   "r   r   r   K   s&     [ [(36" [9P [UV [r   c                   R # r*   r+   r,   s   "$r   r"   r"   J   s    X[r   r&   c                    V ^8  d   QhR\         R\        RR\        3,          3,          R\        R,          R\        /# )r   r%   .Nr&   r(   )r   r   r   r   )r   s   "r   r   r   O   s?      sIdD#o667NZ]aNar   c                   R # r*   r+   r,   s   "$r   r"   r"   N   s     r   c                d    V ^8  d   QhR\         R\        3,          R\        R,          R\        /# )r   r%   .r&   Nr(   )r   r   r   )r   s   "r   r   r   U   s&     b b(38$ b<$;N bZ] br   c                   R # r*   r+   r,   s   "$r   r"   r"   T   s    _br   c                2    V ^8  d   QhR\         R,          /# )r   r&   Nr   )r   s   "r   r   r   X   s     , ,|d': ,r   c              j    \         f	   ^ RIH p Vs \        VR7      pVP                  V 4       V! 4       # )a/  Run the given callable as a CLI command.

The callable may also be a coroutine function.
This function is syntax sugar for very simple use cases, and is roughly equivalent to:

.. code-block:: python

    from cyclopts import App

    app = App()
    app.default(callable)
    app()

Parameters
----------
callable
    The function to execute as a CLI command.
result_action
    How to handle the command's return value. If not specified, uses the default
    ``"print_non_int_sys_exit"`` which calls :func:`sys.exit` with the appropriate code.
    Can be set to ``"return_value"`` to return the result directly for testing/embedding.

Example usage:

.. code-block:: python

    import cyclopts


    def main(name: str, age: int):
        print(f"Hello {name}, you are {age} years old.")


    cyclopts.run(main)
r   )r&   )r   cyclopts.coredefault)r%   r&   _Appapps   "$  r   r"   r"   X   s/    J {-
M
*CKK5Lr   )      )Nr   )r   syscollections.abcr   r   	functoolsr   typingr   r   r   r	   r
   cyclopts._result_actionr   version_infotyping_extensionsr   r5   r   r   r#   r"   r+   r   r   <module>rB      s     
 /  A A 0g.#!CL ,^ 
 r 
 r 
 [ 
 [ 
dh 

 
 bQU b 
 b,T , ,r   