
    kju              /       D   d Z ddl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m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mZmZ dd	l m!Z! dd
l"m#Z# ddlm$Z$  edej%                  Z& edej'                  Z( G d de!eej%                  Z% G d dee%ej'                  Z'e	 dCddddddddddddddddde	e)         de	ee)                  ddde	ee)ef                  de	ee)ef                  de	e)         de	e)         de	e)         de	e)         d e*d!e*d"e*d#e*d$e	e*         d%e	e*         d&e	eej+                          d'ee$ge%f         f"d(            Z,e	 dCdddddddddddd)de	e)         de	ee)                  dee&         de	ee)ef                  de	e)         de	e)         de	e)         de	e)         d e*d!e*d"e*d#e*d&e	eej+                          d*ed'ee$ge&f         fd+            Z,	 dCddd,de	e)         de	ee)                  de	ee&                  d*ed'ee$gee%e&f         f         f
d-Z,e	 dCddd.ddddi dddddddddddd/de	e)         ddde	ee)                  d0ee         d1e	e*         d2e*d!e*de	ee)ef                  dee)ef         de	e)         de	e)         de	e)         de	e)         d3e	e)         d e*d4e*d"e*d#e*d&e	eej+                          d5e*d'ee$ge'f         f*d6            Z-e	 dCddddddddddddddd7de	e)         dee(         de	ee)                  d2e*d!e*de	ee)ef                  de	e)         de	e)         de	e)         de	e)         d3e	e)         d e*d4e*d"e*d#e*d&e	eej+                          d*ed'ee$ge(f         f$d8            Z-	 dCdd9de	e)         de	ee(                  d*ed'ee$gej'        f         fd:Z- G d; d<e          Z.d=  e.de%d>           e.d$ed>           e.d%e!d>           e.d1ed?          fD             Z/d@e0dAee)e.f         dee%         d'e0fdBZ1dS )Da~  
This module contains Cloup command classes and decorators.

Note that Cloup commands *are* Click commands. Apart from supporting more
features, Cloup command decorators have detailed type hints and are generics so
that type checkers can precisely infer the type of the returned command based on
the ``cls`` argument.

Why did you overload all decorators?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I wanted that the return type of decorators depended from the ``cls`` argument
but MyPy doesn't allow you to set a default value on a generic argument, see:
https://github.com/python/mypy/issues/3737.
So I had to resort to a workaround using @overload which makes things more
verbose. '`@overload`` is on the ``cls`` argument:

- in one signature, ``cls`` has type ``None`` and it's set to ``None``; in this
  case the type of the instantiated command is ``cloup.Command`` for ``@command``
  and ``cloup.Group`` for ``@group``
- in the other signature, there's ``cls: C`` without a default, where ``C`` is
  a type variable; in this case the type of the instantiated command is ``C``.

When and if the MyPy issue is resolved, the overloads will be removed.
    N)AnyCallableDictIterableList
NamedTupleOptionalSequenceTupleTypeTypeVarUnioncastoverloadMutableMappingMapping   )Context)OptionGroupMixin)SectionSectionMixin)click_version_ge_8_1
first_boolreindent)ConstraintMixin)DEFAULT_THEME)AnyCallableC)boundGc            
       8    e Zd ZU dZeZee         ed<   ddddede	e
e                  de	eeef                  def fd	Zd
efdZdej        dej        d
dfdZdej        dej        d
dfdZdej        dej        d
dfdZdej        dej        d
dfdZ xZS )Commanda  A ``click.Command`` supporting option groups and constraints.

    Refer to superclasses for the documentation of all accepted parameters:

    - :class:`ConstraintMixin`
    - :class:`OptionGroupMixin`
    - :class:`click.Command`

    Besides other things, this class also:

    * adds a ``formatter_settings`` instance attribute.

    Refer to :class:`click.Command` for the documentation of all parameters.

    .. versionadded:: 0.8.0
    context_classN)aliasesformatter_settingsargsr$   r%   kwargsc                     t                      j        |i | |g nt          |          | _        |i n|| _        d S N)super__init__listr$   r%   )selfr$   r%   r&   r'   	__class__s        J/home/agentuser/manim-venv/lib/python3.11/site-packages/cloup/_commands.pyr+   zCommand.__init__B   sS     	$)&))) )0""T']]$,BB2D 	    returnc                 b    | j         r t          rt          j        | j                   S | j         pdS )N )epilogr   inspectcleandoc)r-   s    r/   get_normalized_epilogzCommand.get_normalized_epilogO   s4    ; 	1/ 	1#DK000{ b r0   ctx	formatterc                     | j         r[t          |t          j                  sJ |                                 }|                                 |                    |           d S d S r)   )r4   
isinstancecloupHelpFormatterr7   write_paragraphwrite_epilog)r-   r8   r9   r4   s       r/   format_epilogzCommand.format_epilogU   sl    ; 	+i)<=====//11F%%'''""6*****		+ 	+r0   c                 h    t          |t          j                  sJ |                    |            d S r)   )r;   r<   r=   write_command_help_textr-   r8   r9   s      r/   format_help_textzCommand.format_help_text\   s7     )U%899999))$/////r0   c                     | j         sd S t          |t          j                  sJ |                    | j                    d S r)   )r$   r;   r<   r=   write_aliasesrC   s      r/   format_aliaseszCommand.format_aliasesb   sF    | 	F)U%899999-----r0   c                    |                      ||           |                     ||           |                     ||           |                     ||           |                     |          r|                     ||           t          | t          j                  r| 	                    ||           | 
                    ||           d S r)   )format_usagerG   rD   format_paramsmust_show_constraintsformat_constraintsr;   clickMultiCommandformat_commandsr@   rC   s      r/   format_helpzCommand.format_helph   s    #y)))C+++c9---3	***%%c** 	4##C333dE.// 	1  i0003	*****r0   )__name__
__module____qualname____doc__r   r#   r   __annotations__r   r	   r   strr   r+   r7   rM   r=   r@   rD   rG   rP   __classcell__r.   s   @r/   r"   r"   /   s           $+M4=*** ,07;F F FF(3-(F %T#s(^4F 	F F F F F F!s ! ! ! !+ +5;N +SW + + + +0=0-2-@0	0 0 0 0.%- .E<O .TX . . . .	+u} 	+9L 	+QU 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+r0   r"   c            /       	    e Zd ZU dZdZeed<   ddddedee         dee	e
eej        f         eej                 f                  d	ef fd
Zde	eeej        f         eej                 f         ddfdZ	 	 	 dAdej        dee         dee         deddf
 fdZdej        dedee         fdZdej        dee         deee         eej                 ee         f         f fdZdedee         dej        dej        fdZdej        defdZdej        dedej        defdZedee         dej        defd            Z e!	 dBddddddddddddddddd dee         dee"e                  d!ddee         d"ee#eef                  d#ee#eef                  d$ee         d%ee         d&ee         d'ee         d(ed)ed*ed+ed,ee         d-ee         d.eeej$                          de%e&gej        f         f$d/            Z'e!	 dBddddddddddddd0dee         dee"e                  d!e(e)         dee         d"ee#eef                  d$ee         d%ee         d&ee         d'ee         d(ed)ed*ed+ed.eeej$                          d	ede%e&ge)f         f d1            Z'	 dBdddd2dee         dee"e                  d!ee(e)                  dee         d	ede%e&ge	ej        e)f         f         fd3Z'e!	 dBdddd4ddddi ddddddddddd5dee         dee"e                  d!ddee         d6e"e         d7ee         d8ed)ed"ee#eef                  d#e#eef         d$ee         d%ee         d&ee         d'ee         d9ee         d(ed:ed*ed+edede%e&gej*        f         f*d;            Z+e!	 dBddddddddddddddddd<dee         dee"e                  d!ee(e,                  dee         d8ed)ed"ee#eef                  d$ee         d%ee         d&ee         d'ee         d9ee         d(ed:ed*ed+ed.eeej$                          d	ede%e&ge,f         f&d=            Z+	 dBdddd>ded         d!ee(e,                  dee"e                  dee         d	ede%e&ge	ej*        e,f         f         fd?Z+e-dee(ej*                          fd@            Z. xZ/S )CGroupa  
    A ``click.Group`` that allows to organize its subcommands in multiple help
    sections and whose subcommands are, by default, of type :class:`cloup.Command`.

    Refer to superclasses for the documentation of all accepted parameters:

    - :class:`SectionMixin`
    - :class:`Command`
    - :class:`click.Group`

    Apart from superclasses arguments, the following is the only additional parameter:

    ``show_subcommand_aliases``: ``Optional[bool] = None``
        whether to show subcommand aliases; aliases are shown by default and
        can be disabled using this argument or the homonym context setting.

    .. versionchanged:: 0.14.0
        this class now supports option groups and constraints.

    .. versionadded:: 0.10.0
        the "command aliases" feature, including the ``show_subcommand_aliases``
        parameter/attribute.

    .. versionchanged:: 0.8.0
        this class now inherits from :class:`cloup.BaseCommand`.
    FSHOW_SUBCOMMAND_ALIASESN)show_subcommand_aliasescommandsr&   r\   r]   r'   c                     t                      j        |i | || _        	 i | _        	 |r|                     |           d S d S r)   )r*   r+   r\   
alias2nameadd_multiple_commands)r-   r\   r]   r&   r'   r.   s        r/   r+   zGroup.__init__   sb     	$)&)))'>$1*,> 	1&&x00000	1 	1r0   r1   c                     t          |t                    r3|                                D ]\  }}|                     ||           d S |D ]}|                     |           d S )N)name)r;   r   itemsadd_command)r-   r]   rb   cmds       r/   r`   zGroup.add_multiple_commands   s     h(( 	&%^^-- 1 1	c  4 00001 1   & &  %%%%& &r0   Tre   rb   sectionfallback_to_default_sectionc                     t                                          ||||           |t          t          |j                  n|}t          |dg           }|D ]}|| j        |<   d S )Nr$   )r*   rd   r   rV   rb   getattrr_   )r-   re   rb   rf   rg   r$   aliasr.   s          r/   rd   zGroup.add_command   sw     	Cw0KLLL&*ltC"""#y"-- 	* 	*E%)DOE""	* 	*r0   r8   c                     |j         r|                     |          }|| j        v r|S | j                            |          S )zMap a string supposed to be a command name or an alias to a normalized
        command name. If no match is found, it returns ``None``.)token_normalize_funcr]   r_   get)r-   r8   rb   s      r/   resolve_command_namezGroup.resolve_command_name   sJ     # 	2++D11D4=  K""4(((r0   c                    |                      ||d                   }|r||d<   	 t                                          ||          S # t          j        $ r3}|                     |d         g | j        | j        |          }|d }~ww xY w)Nr   )bad_namevalid_nameserror)rn   r*   resolve_commandrM   
UsageErrorhandle_bad_command_namer]   r_   )r-   r8   r&   normalized_namerr   	new_errorr.   s         r/   rs   zGroup.resolve_command   s     33CaAA 	&
 &DG	77**3555 	 	 	44a>dm>do> 5  I
 O	s   !A B
.BB
rp   rq   rr   c                 :   ddl }|                    ||          }|s|S t          |          dk    rd|d          d}n$d                    d |D                       }d|z   }t	          |          d	z   |z   }t
          j                            ||j                  S )
a  This method is called when a command name cannot be resolved.
        Useful to implement the "Did you mean <x>?" feature.

        :param bad_name: the command name that could not be resolved.
        :param valid_names: the list of valid command names, including aliases.
        :param error: the original error coming from Click.
        :return: the original error or a new one.
        r   Nr   zDid you mean 'z'?
c              3       K   | ]	}d |z   V  
dS )z   N ).0matchs     r/   	<genexpr>z0Group.handle_bad_command_name.<locals>.<genexpr>   s&      $H$HuUU]$H$H$H$H$H$Hr0   zDid you mean one of these?
 )	difflibget_close_matcheslenjoinrV   rM   
exceptionsrt   r8   )	r-   rp   rq   rr   r   matches	extra_msgmatches_list	error_msgs	            r/   ru   zGroup.handle_bad_command_name   s     	++HkBB 	FL\\Q7777II99$H$H$H$H$HHHL6EIJJ$y0	**9ei@@@r0   c                 `    t          | j        t          |dd           t          j                  S )Nr\   )r   r\   ri   rZ   r[   )r-   r8   s     r/   must_show_subcommand_aliasesz"Group.must_show_subcommand_aliases   s0    (C2D99)
 
 	
r0   c                 8   t          |dd           }|r|                     |          rqt          |t          j                  sJ t          t          j        |j                            dt                              }| 
                    ||          }| d| S |S )Nr$   themer   )ri   r   r;   r<   r   r   	HelpThemer%   rm   r   format_subcommand_aliases)r-   r8   rb   re   r$   r   
alias_lists          r/   format_subcommand_namezGroup.format_subcommand_name   s     #y$// 	*t88== 	*c5=11111!7!;!;G]!S!S E 77GGJ))Z)))r0   r$   r   c                    j         }||j        k    r,                    dd                    |            d          S  |d           |d                              fd| D                       z    |d          z   S )N(z, )c              3   B   K   | ]}                     |          V  d S r)   )rj   )r|   rj   r   s     r/   r~   z2Group.format_subcommand_aliases.<locals>.<genexpr>
  s/      ,U,UEU[[-?-?,U,U,U,U,U,Ur0   )alias_secondaryrj   r   )r$   r   secondary_styles    ` r/   r   zGroup.format_subcommand_aliases  s    /"o&D&D;;8499W#5#5888999  $$!/$'',,,U,U,U,UW,U,U,UUUV!/#&&'r0   	[OPTIONS])r$   clsrf   context_settingsr%   helpr4   
short_helpoptions_metavaradd_help_optionno_args_is_helphidden
deprecatedalign_option_groupsshow_constraintsparamsr   r   r%   r   r4   r   r   r   r   r   r   r   r   r   c                    d S r)   r{   )r-   rb   r$   r   rf   r   r%   r   r4   r   r   r   r   r   r   r   r   r   s                     r/   commandzGroup.command  	    * 	r0   )r$   rf   r   r   r4   r   r   r   r   r   r   r   c                    d S r)   r{   )r-   rb   r$   r   rf   r   r   r4   r   r   r   r   r   r   r   r'   s                   r/   r   zGroup.command(  s	    & 	r0   )r$   r   rf   c                t     t          d|| j        n||d|dt          dt          j        f fd}|S )a  Return a decorator that creates a new subcommand of this ``Group``
        using the decorated function as callback.

        It takes the same arguments of :func:`command` plus:

        ``section``: ``Optional[Section]``
            if provided, put the subcommand in this section.

        .. versionchanged:: 0.10.0
            all arguments but ``name`` are now keyword-only.
        Nrb   r   r$   fr1   c                 L     |           }                     |           |S N)rf   rd   )r   re   make_commandrf   r-   s     r/   	decoratorz Group.command.<locals>.decoratorT  s.    ,q//CS'222Jr0   r{   )r   command_classr   rM   r"   )r-   rb   r$   r   rf   r'   r   r   s   `   `  @r/   r   zGroup.command=  s|    $  
#+D..3
 
%
 

	 	 	 	 	 	 	 	 	 	
 r0   r{   )r$   r   rf   sectionsalign_sectionsinvoke_without_commandr   r   r%   r   r4   r   r   subcommand_metavarr   chainr   r   r\   r   r   r   r   r   c                    d S r)   r{   )r-   rb   r$   r   rf   r   r   r   r   r   r%   r   r4   r   r   r   r   r   r   r   r\   s                        r/   groupzGroup.group^  s	    0 	r0   )r$   r   rf   r   r   r   r   r4   r   r   r   r   r   r   r   r   c                    d S r)   r{   )r-   rb   r$   r   rf   r   r   r   r   r4   r   r   r   r   r   r   r   r   r'   s                      r/   r   zGroup.groupx  r   r0   )r   r$   rf   c                     t          d||p                                 |d|dt          dt          t          j        t          f         f fd}|S )a  Return a decorator that creates a new subcommand of this ``Group``
        using the decorated function as callback.

        It takes the same argument of :func:`group` plus:

        ``section``: ``Optional[Section]``
            if provided, put the subcommand in this section.

        .. versionchanged:: 0.10.0
            all arguments but ``name`` are now keyword-only.
        r   r   r1   c                 L     |           }                     |           |S r   r   )r   re   
make_grouprf   r-   s     r/   r   zGroup.group.<locals>.decorator  s.    *Q--CS'222Jr0   r{   )r   _default_group_classr   r   rM   rZ   r    )r-   rb   r   r$   rf   r'   r   r   s   `   `  @r/   r   zGroup.group  s    &  
3=$";";"="=w
 
RX
 

	 	u{A~)> 	 	 	 	 	 	 	 	
 r0   c                     | j         d S | j         t          u r| S t          t          t          j                 | j                   S r)   )group_classtyper   r   rM   rZ   r   s    r/   r   zGroup._default_group_class  s:    ?"4?d""JU[)3?;;;r0   )NNTr)   )0rQ   rR   rS   rT   r[   boolrU   r   r	   r   r   rV   rM   r"   r
   r+   r   r`   r   rd   r   rn   r   r   rs   rt   ru   r   r   staticmethodr<   r   r   r   r   r   	Parameterr   r   r   r   r   rZ   r   r    classmethodr   rW   rX   s   @r/   rZ   rZ   t   s	         4 %*T))) 37 1 1 11!)$1 .em!34hu}6MMN
1 1 1 1 1 1 1$&gc5=&898EM;RRS&	& & & & #%),0	
* 
*=
*sm
* '"
* &*	
*
 

* 
* 
* 
* 
* 
*) )S )Xc] ) ) ) )=(,S		x}hu}5tCy@	A     (AA*.s)A<A<LA		A A A A0
 
$ 
 
 
 
=(+27-	    	8C= 	 	UX 	 	 	 \	 $( ,0%)597;" $$()4 $ % .2+/26%  SM (3-( 	
 '" #4S>2 %T#s(^4 sm  SM "#      &d^!" #4.#$ eo./%& 
;-.	/'   X, $( ,0%)59" $$()4 $ % 26  SM (3-( !W	
 '" #4S>2 sm  SM "#     eo./  !" 
;-"	##   X* %)+/!%%)	  SM(3-( d1g '"	
  
;-u}a'7!88	9   B $( ,0%)&()-', %59-/" $$()4,0 $ (-+  SM (3-( 	
 '" 7# ! !%  #4S>2 !cN sm  SM "#  %SM!" #$ %& '( )* "&+, 
;-,	--   X2 $(+/!%%)', %59" $$()4,0 $ 26#  SM(3-( d1g '"	
 !%  #4S>2 sm  SM "# %SM     !" eo./#$ %& 
;-"	#'   X. &* "&+/%)  TN d1g (3-(	
 '"  
;-u{A~!66	7   < <Xd5;.?%@ < < < [< < < < <r0   rZ   r   TF)r$   r   r   r%   r   r   r4   r   r   r   r   r   r   r   r   rb   r$   r   r   r%   r   r   r4   r   r   r   r   r   r   r   r   r1   c                    d S r)   r{   )rb   r$   r   r   r%   r   r   r4   r   r   r   r   r   r   r   r   s                   r/   r   r     s	    ( Cr0   )r$   r   r   r   r4   r   r   r   r   r   r   r'   c                    d S r)   r{   )rb   r$   r   r   r   r   r4   r   r   r   r   r   r   r'   s                 r/   r   r     s	    $ Cr0   )r$   r   c                     t                     rt          d j         d          dt          dt          f fd}|S )a  
    Return a decorator that creates a new command using the decorated function
    as callback.

    The only differences with respect to ``click.command`` are:

    - the default command class is :class:`cloup.Command`
    - supports constraints, provided that ``cls`` inherits from ``ConstraintMixin``
      like ``cloup.Command`` (the default)
    - this function has detailed type hints and uses generics for the ``cls``
      argument and return type.

    Note that the following arguments are about Cloup-specific features and are
    not supported by all ``click.Command``, so if you provide a custom ``cls``
    make sure you don't set these:

    - ``formatter_settings``
    - ``align_option_groups`` (``cls`` needs to inherit from ``OptionGroupMixin``)
    - ``show_constraints`` (``cls`` needs to inherit ``ConstraintMixin``).

    .. versionchanged:: 0.10.0
        this function is now generic: the return type depends on what you provide
        as ``cls`` argument.

    .. versionchanged:: 0.9.0
        all arguments but ``name`` are now keyword-only arguments.

    :param name:
        the name of the command to use unless a group overrides it.
    :param aliases:
        alternative names for this command. If ``cls`` is not a Cloup command class,
        aliases will be stored in the instantiated command by monkey-patching
        and aliases won't be documented in the help page of the command.
    :param cls:
        the command class to instantiate.
    :param context_settings:
        an optional dictionary with defaults that are passed to the context object.
    :param formatter_settings:
        arguments for the formatter; you can use :meth:`HelpFormatter.settings`
        to build this dictionary.
    :param help:
        the help string to use for this command.
    :param epilog:
        like the help string but it's printed at the end of the help page after
        everything else.
    :param short_help:
        the short help to use for this command.  This is shown on the command
        listing of the parent command.
    :param options_metavar:
        metavar for options shown in the command's usage string.
    :param add_help_option:
        by default each command registers a ``--help`` option.
        This can be disabled by this parameter.
    :param no_args_is_help:
        this controls what happens if no arguments are provided. This option is
        disabled by default. If enabled this will add ``--help`` as argument if
        no arguments are passed
    :param hidden:
        hide this command from help outputs.
    :param deprecated:
        issues a message indicating that the command is deprecated.
    :param align_option_groups:
        whether to align the columns of all option groups' help sections.
        This is also available as a context setting having a lower priority
        than this attribute. Given that this setting should be consistent
        across all you commands, you should probably use the context
        setting only.
    :param show_constraints:
        whether to include a "Constraint" section in the command help. This
        is also available as a context setting having a lower priority than
        this attribute.
    :param params:
        **(click >= 8.1.0)** a list of parameters (:class:`Argument` and
        :class:`Option` instances). Params added with ``@option`` and ``@argument``
        are appended to the end of the list if given.
    :param kwargs:
        any other argument accepted by the instantiated command class (``cls``).
    z5you forgot parenthesis in the command decorator for `zN`. While parenthesis are optional in Click >= 8.1, they are required in Cloup.r   r1   c           	         t          | d          rRr(t          t                    st          d d          t	          t          | j                            }| `|d<   t          t          t                   nt                    }	 t          t           t          j        fd|i|                     }rt                    |_        |S # t          $ r}t          |t           |          d }~ww xY w)N__cloup_constraints__zOa `Command` must inherit from `cloup.ConstraintMixin` to support constraints; `z	` doesn'tconstraintsr   )hasattr
issubclassr   	TypeErrortuplereversedr   r   r   r"   r   rM   r   r,   r$   _process_unexpected_kwarg_error
_ARGS_INFO)	r   r   cmd_clsre   rr   r$   r   r'   rb   s	        r/   r   zcommand.<locals>.decorator?  s#   1-.. 	0 5:c?;; 54%(4 4 45 5 5  )@ A ABBK'$/F=!tG}S_cc'JJ	NqD%-DD'DVDDQGGHHC ,"7mmJ 	N 	N 	N1%WMMM	Ns   AC 
C; C66C;)callable	ExceptionrQ   r   r   )rb   r$   r   r'   r   s   ```` r/   r   r     s    h ~~ 
[DM [ [ [
 
 	

N[ NQ N N N N N N N N N& r0   r{   )r   r$   r   r   r   r   r   r%   r   r   r4   r   r   r   r   r   r   r   r\   r   r   r   r   r   r\   c                    d S r)   r{   )rb   r   r$   r   r   r   r   r   r%   r   r   r4   r   r   r   r   r   r   r   r\   s                       r/   r   r   U  s	    0 Cr0   )r$   r   r   r   r   r   r4   r   r   r   r   r   r   r   c                    d S r)   r{   )rb   r   r$   r   r   r   r   r   r4   r   r   r   r   r   r   r   r'   s                    r/   r   r   p  s	    * Cr0   r   c                    |t          d| t          d|S t          |t          j                  rt          d| |d|S t	          d          )a  
    Return a decorator that instantiates a ``Group`` (or a subclass of it)
    using the decorated function as callback.

    .. versionchanged:: 0.10.0
        the ``cls`` argument can now be any ``click.Group`` (previously had to
        be a ``cloup.Group``) and the type of the instantiated command matches
        it (previously, the type was ``cloup.Group`` even if ``cls`` was a subclass
        of it).

    .. versionchanged:: 0.9.0
        all arguments but ``name`` are now keyword-only arguments.

    :param name:
        the name of the command to use unless a group overrides it.
    :param cls:
        the ``click.Group`` (sub)class to instantiate. This is ``cloup.Group``
        by default. Note that some of the arguments are only supported by
        ``cloup.Group``.
    :param sections:
        a list of Section objects containing the subcommands of this ``Group``.
        This argument is only supported by commands inheriting from
        :class:`cloup.SectionMixin`.
    :param align_sections:
        whether to align the columns of all subcommands' help sections.
        This is also available as a context setting having a lower priority
        than this attribute. Given that this setting should be consistent
        across all you commands, you should probably use the context
        setting only.
    :param context_settings:
        an optional dictionary with defaults that are passed to the context object.
    :param formatter_settings:
        arguments for the formatter; you can use :meth:`HelpFormatter.settings`
        to build this dictionary.
    :param help:
        the help string to use for this command.
    :param short_help:
        the short help to use for this command.  This is shown on the command
        listing of the parent command.
    :param epilog:
        like the help string but it's printed at the end of the help page after
        everything else.
    :param options_metavar:
        metavar for options shown in the command's usage string.
    :param add_help_option:
        by default each command registers a ``--help`` option.
        This can be disabled by this parameter.
    :param hidden:
        hide this command from help outputs.
    :param deprecated:
        issues a message indicating that the command is deprecated.
    :param invoke_without_command:
        this controls how the multi command itself is invoked. By default it's
        only invoked if a subcommand is provided.
    :param no_args_is_help:
        this controls what happens if no arguments are provided. This option is
        enabled by default if `invoke_without_command` is disabled or disabled
        if it's enabled. If enabled this will add ``--help`` as argument if no
        arguments are passed.
    :param subcommand_metavar:
        string used in the command's usage string to indicate the subcommand place.
    :param chain:
        if this is set to `True`, chaining of multiple subcommands is enabled.
        This restricts the form of commands in that they cannot have optional
        arguments but it allows multiple commands to be chained together.
    :param params:
        **(click >= 8.1.0)** a list of parameters (:class:`Argument` and
        :class:`Option` instances). Params added with ``@option`` and ``@argument``
        are appended to the end of the list if given.
    :param kwargs:
        any other argument accepted by the instantiated command class.
    N)rb   r   zCthis decorator requires `cls` to be a `click.Group` (or a subclass)r{   )r   rZ   r   rM   r   )rb   r   r'   s      r/   r   r     sm    V {6De66v666	C	%	% S4Dc44V444QS S 	Sr0   c                   >    e Zd ZU eed<   ee         ed<   dZeed<   dS )_ArgInfoarg_namerequiresr3   supported_byN)rQ   rR   rS   rV   rU   r   r   r   r{   r0   r/   r   r     s;         MMM3iL#r0   r   c                     i | ]
}|j         |S r{   )r   )r|   infos     r/   
<dictcomp>r     s)        DM4  r0   zboth `Command` and `Group`z`Group`rr   	args_infoc                 T   ddl }t          |           }|                    d                    d |D                       |          }|| S |                                }||         }t          d| d| d|j         d|j        j         d		d
          }|dz   |z   }	t          |	          S )zCheck if the developer tried to pass a Cloup-specific argument to a ``cls``
    that doesn't support it and if that's the case, augments the error message
    to provide useful more info about the error.r   N|c              3      K   | ]}|V  d S r)   r{   )r|   r   s     r/   r~   z2_process_unexpected_kwarg_error.<locals>.<genexpr>  s"      BBHxBBBBBBr0   z

        Hint: you set `cls=z/` but this class doesn't support the argument `z4`.
        In Cloup, this argument is supported by `z`
        via `z`.
       ry   )
rerV   searchr   r   r   r   r   rQ   r   )
rr   r   r   r   messager}   argr   
extra_infonew_messages
             r/   r   r     s     III%jjGIIchhBB	BBBBBGLLE}
++--CS>D  PS 262C  m$   
	 J
 D.:-K[!!!r0   r)   )2rT   r5   typingr   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   rM   r<   _contextr   _option_groupsr   	_sectionsr   r   _utilr   r   r   r   r   stylingr   r   r"   r   rZ   r    rV   r   r   r   r   r   r   r   r   r{   r0   r/   <module>r      s	   0                                    
         , , , , , , , , , , , , , , = = = = = = = = = = ( ( ( ( ( ( " " " " " "       GCu}%%%GCu{###B+ B+ B+ B+ B+o/ B+ B+ B+J@< @< @< @< @<L'5; @< @< @<H
 
 (,1537 $ %0 !*.'+.2#  
3- hsm$ 
	
 tCH~. !c3h0 3-  SM c]     "$  tn!" T%/*+#$ {mW$%%   
, 
 (,15 $ %0 !.2  
3- hsm$ 
a	
 tCH~. 3-  SM c]     T%/*+   {mQ!   
, m'+!m m m
3-mhsm$m 
$q'	m 	m
 {mU7A:../m m m m` 
 '+"$%)#(!15)+ $ %0(, .2$)+  
3- 
 hsm$	
 w TN !  tCH~. S#X 3-  SM c] !  !" #$ %& '( T%/*+)* "+, {mU"#-   
4 
 (,#(!15 $ %0(, .2#  
3- 
a hsm$	
 !  tCH~. 3-  SM c] !     !" T%/*+#$ %& {mQ'   
0 QS<@QS QS QS
3-QS(0a(9QSLOQS{mU[()QS QS QS QSl    z    %w0LMM&(8:VWW#_6RSS!<;;	%  
""!%c8m!4";?="" " " " " "r0   