o
    3g˔                     @  s8  d dl mZ d dlZd dl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 d dl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 dd
lmZ eeZ e j!e j"Z#Z"G dd deZ$G dd deZ%G dd deZ&G dd dZ'G dd dZ(ddgZ)e#de#dgZ*G dd dZ+dS )    )annotationsN)defaultdict)TextWrapper)colorslocal)get_translation_for)getdoc   )CountOfFlagMissingArgumentMissingMandatorySwitchPositionalArgumentsErrorSubcommandErrorSwitchCombinationErrorSwitchErrorUnknownSwitchWrongArgumentTypeswitch)get_terminal_sizec                   @     e Zd ZdS )ShowHelpN__name__
__module____qualname__ r   r   O/home/garg/my-data/venv/lib/python3.10/site-packages/plumbum/cli/application.pyr   !       r   c                   @  r   )ShowHelpAllNr   r   r   r   r   r   %   r   r   c                   @  r   )ShowVersionNr   r   r   r   r   r    )   r   r    c                   @  s   e Zd Zg dZdd ZdS )SwitchParseInfo)swnamevalindex__weakref__c                 C  s   || _ || _|| _d S N)r"   r#   r$   )selfr"   r#   r$   r   r   r   __init__0   s   
zSwitchParseInfo.__init__N)r   r   r   	__slots__r(   r   r   r   r   r!   -   s    r!   c                   @  s$   e Zd Zdd Zdd Zdd ZdS )
Subcommandc                 C  s   || _ || _d S r&   )namesubapplication)r'   r+   r,   r   r   r   r(   7   s   
zSubcommand.__init__c                 C  sf   t | jtr0| jdd\}}t|d d d}zt||}W n ty,   td| d w || _| jS )N.r	   *zcannot import name )
isinstancer,   strrsplit
__import__getattrAttributeErrorImportError)r'   modnameclsnamemodclsr   r   r   get;   s   zSubcommand.getc                 C  s   t dj| dS )Nz.Subcommand({self.name}, {self.subapplication})r'   )T_formatr;   r   r   r   __repr__F   s   zSubcommand.__repr__N)r   r   r   r(   r:   r>   r   r   r   r   r*   6   s    r*   SwitchesMeta-switchesc                      sd  e Zd ZdZdZdZdZdZdZdZ	dZ
dZdZdZedZdZdZdZdZd9 fdd	Zd	d
 Zedd Zedd Zed9ddZdd Zdd Zedd Zedd Zdd Z dd Z!e		d:ddZ"edd  Z#d!d" Z$d#d$ Z%d%d& Z&e'd'gdd(ed)d*d+d, Z(e'd-d.gdd(ed/d*d0d1 Z)d2d3 Z*e'd4d5gdd(ed6d*d7d8 Z+  Z,S );Applicationa  The base class for CLI applications; your "entry point" class should derive from it,
    define the relevant switch functions and attributes, and the ``main()`` function.
    The class defines two overridable "meta switches" for version (``-v``, ``--version``)
    help (``-h``, ``--help``), and help-all (``--help-all``).

    The signature of the main function matters: any positional arguments (e.g., non-switch
    arguments) given on the command line are passed to the ``main()`` function; if you wish
    to allow unlimited number of positional arguments, use varargs (``*args``). The names
    of the arguments will be shown in the help message.

    The classmethod ``run`` serves as the entry point of the class. It parses the command-line
    arguments, invokes switch functions and enters ``main``. You should **not override** this
    method.

    Usage::

        class FileCopier(Application):
            stat = Flag("p", "copy stat info as well")

            def main(self, src, dst):
                if self.stat:
                    shutil.copy2(src, dst)
                else:
                    shutil.copy(src, dst)

        if __name__ == "__main__":
            FileCopier.run()

    There are several class-level attributes you may set:

    * ``PROGNAME`` - the name of the program; if ``None`` (the default), it is set to the
      name of the executable (``argv[0]``); can be in color. If only a color, will be applied to the name.

    * ``VERSION`` - the program's version (defaults to ``1.0``, can be in color)

    * ``DESCRIPTION`` - a short description of your program (shown in help). If not set,
      the class' ``__doc__`` will be used. Can be in color.

    * ``DESCRIPTION_MORE`` - a detailed description of your program (shown in help). The text will be printed
      by paragraphs (specified by empty lines between them). The indentation of each paragraph will be the
      indentation of its first line. List items are identified by their first non-whitespace character being
      one of '-', '*', and '/'; so that they are not combined with preceding paragraphs. Bullet '/' is
      "invisible", meaning that the bullet itself will not be printed to the output.

    * ``USAGE`` - the usage line (shown in help).

    * ``COLOR_USAGE_TITLE`` - The color of the usage line's header.

    * ``COLOR_USAGE`` - The color of the usage line.

    * ``COLOR_GROUPS`` - A dictionary that sets colors for the groups, like Meta-switches, Switches,
      and Subcommands.

    * ``COLOR_GROUP_TITLES`` - A dictionary that sets colors for the group titles. If the dictionary is empty,
      it defaults to ``COLOR_GROUPS``.

    * ``SUBCOMMAND_HELPMSG`` - Controls the printing of extra "see subcommand -h" help message.
      Default is a message, set to False to remove.

    * ``ALLOW_ABBREV`` - Controls whether partial switch names are supported, for example '--ver' will match
      '--verbose'. Default is False for backward consistency with previous plumbum releases. Note that ambiguous
      abbreviations will not match, for example if --foothis and --foothat are defined, then --foo will not match.

    A note on sub-commands: when an application is the root, its ``parent`` attribute is set to
    ``None``. When it is used as a nested-command, ``parent`` will point to its direct ancestor.
    Likewise, when an application is invoked with a sub-command, its ``nested_command`` attribute
    will hold the chosen sub-application and its command-line arguments (a tuple); otherwise, it
    will be set to ``None``

    NTz)see '{parent} {sub} --help' for more infoFr   c                   s   |du r|   S t | S )zAllows running the class directly as a shortcut for main.
        This is necessary for some setup scripts that want a single function,
        instead of an expression with a dot in it.N)runsuper__new__)r9   
executable	__class__r   r   rD      s   zApplication.__new__c                 C  s  | j d u rtj|| _ n't| j tjr| j tj|B | _ nt| j dkr4t| j tj|B | _ | j	d u r>t
| | _	tdd t| jd u rKi nt| j| _tdd t| jd u r`| jnt| j| _t| jd u rrtj| _|| _i | _i | _i | _i | _tt|  D ]d}|j D ]\}t|trt|j}|drttd|| j|< qt|dd }|sq|j D ]1}|| j!v rq|| jv r| j| j"st#tdj$|d	|| j|< || j|j%< |j&r|| j|j&< qqqd S )
N c                   S     t jS r&   r   
do_nothingr   r   r   r   <lambda>       z&Application.__init__.<locals>.<lambda>c                   S  rI   r&   rJ   r   r   r   r   rL      rM   -z'Sub-command names cannot start with '-'_switch_infoz4Switch {name} already defined and is not overridable)r+   )'PROGNAMEospathbasenamer/   r   _stylefilterextractDESCRIPTIONr   r   typeCOLOR_GROUPSCOLOR_GROUP_TITLESCOLOR_USAGErK   rE   _switches_by_name_switches_by_func_switches_by_envar_subcommandsreversedmro__dict__valuesr*   r+   
startswithr   r<   r3   names_unbound_switchesoverridabler   r=   funcenvname)r'   rE   r9   objr+   swinfor   r   r   r(      sv   










zApplication.__init__c                 C  s   | j r| j jS | S r&   )parentroot_appr;   r   r   r   rm      s   zApplication.root_appc                 G  s    |  j tdd |D 7  _ dS )zUnbinds the given switch names from this application. For example

        ::

            class MyApp(cli.Application):
                pass
            MyApp.unbind_switches("--version")

        c                 s  s    | ]
}|r| d V  qdS )rN   N)lstrip).0r+   r   r   r   	<genexpr>  s    
z.Application.unbind_switches.<locals>.<genexpr>N)rf   tuple)r9   switch_namesr   r   r   unbind_switches   s   zApplication.unbind_switchesc                   s    fdd}|r||S |S )aj  Registers the given sub-application as a sub-command of this one. This method can be
        used both as a decorator and as a normal ``classmethod``::

            @MyApp.subcommand("foo")
            class FooApp(cli.Application):
                pass

        Or ::

            MyApp.subcommand("foo", FooApp)

        .. versionadded:: 1.1

        .. versionadded:: 1.3
            The sub-command can also be a string, in which case it is treated as a
            fully-qualified class name and is imported on demand. For example,

            MyApp.subcommand("foo", "fully.qualified.package.FooApp")

        c                   s4   t | tr| n| j}d| }t |t|  | S )N_subcommand_)r/   r0   r   setattrr*   )subappsubnameattrnamer9   r+   r   r   wrapper"  s   
z'Application.subcommand.<locals>.wrapperr   )r9   r+   rv   rz   r   ry   r   
subcommand  s   zApplication.subcommandc                 C  s(   g }| j D ]}||r||g7 }q|S r&   )r\   rd   )r'   partialnamematchesswitch_r   r   r   _get_partial_matches*  s   

z Application._get_partial_matchesc                 C  sB  g }i }d}|r|d7 }| d}d }|dkr|| n|| jv r>| j|  }|| jd | j| j g|f| _n|drt|dkr|	d}|dkrc|d| }	|
d||d   n|dd  }	| jr| |	}
t|
dkr||
d }	nt|
dkrttdd|	 d|	 }|	| jvrttd	|| j|	 }|jr|sttd
|| d}|r|d dkrt|dkr|dd  }n|sttd
|| d}ny|}nv|drAt|dkrA|d }	d|	 }|	| jvrttd	|| j|	 }|jr-t|dkr|dd  }n;|s'ttd
|| d}n)t|dkr@|
dd|dd    n|drPttd	||| q| ||j|	}|j|v r|jrt||j jd | nI||j j|krttd|ttd||j j||jrt||gf|||j< n|tu rt|d|||j< n
t||f|||j< |s	d}| j D ]V\}}|d8 }tj|}|d u rېq|j|v rq| ||j|}d| }|jrt||gf|||j< q|tu rt|d|||j< qt||f|||j< q||fS )Nr   r	   --    =   zAmbiguous partial switch {0}zUnknown switch {0}zSwitch {0} requires an argumentrN   zSwitch {0} already givenz,Switch {0} already given ({1} is equivalent)r   $) popextendr_   r:   rP   r+   nested_commandrd   lenfindinsertALLOW_ABBREVr   r   r<   r=   r\   argtyper   append_handle_argumentrh   listr#   r"   r   r!   NotImplementedr^   itemsr   env)r'   argvtailargsswfuncsr$   ar#   subcmdeqsignr+   partialsr"   rk   envindexr   envvalri   r   r   r   _parse_args3  s   











j


zApplication._parse_argsc                 C     dS )zSThis is supplied to make subclassing and testing argument completion methods easierNr   )r9   r   r   r   r   autocomplete      zApplication.autocompletec              
   C  sL   |r$z|| W S  t tfy# } zttdj||| |dd d }~ww tS )NzDArgument of {name} expected to be {argtype}, not {val!r}:
    {ex!r})r+   r   r#   ex)	TypeError
ValueErrorr   r<   r=   r   )r#   r   r+   r   r   r   r   r     s    

zApplication._handle_argumentc                   s4   j jv r	t  jjv rt  jjv rt i }i } j D ]6}|j	r@|j
vr@ttdddd |jD  fdd|jD ||j
<  fdd|jD ||j
< q$t }|D ]D}dd || D | }|rttd	| j fd
d|D dd || D |@ }	|	rttd| jfdd|	D qct j}
tjdk rt j}ntj jdd}|
jrtjnt|
jd }t|
jd |
j rt|
j nd }t||k rt!t"dd|||t||krt!t"dd|||t# jdr  $| jj% jj&|
jdd  |
j}nft#|
dr|
j'rt(|
jdd  }d gt| }d }|
j'D ]7}|dkrL|j)| j*n|j+}tjdk r_t,|t-r_t.|}||
jkri|}q?|dkru|||/|< q? $||||
jdd  |
j}dd t0dd 1 D D }||fS )NzSwitch {0} is mandatory/c                 s  (    | ]}t |d krdnd| V  qdS r	   rN   r   Nr   ro   nr   r   r   rp     s    
z-Application._validate_args.<locals>.<genexpr>c                      h | ]} j | qS r   r\   )ro   reqr;   r   r   	<setcomp>      
z-Application._validate_args.<locals>.<setcomp>c                   r   r   r   )ro   excr;   r   r   r     r   c                 S     h | ]}|j qS r   rh   ro   fr   r   r   r         z(Given {0}, the following are missing {1}c                   s   g | ]
} j | jd  qS )r   )r]   re   r   r;   r   r   
<listcomp>  s    z.Application._validate_args.<locals>.<listcomp>c                 S  r   r   r   r   r   r   r   r     r   z(Given {0}, the following are invalid {1}c                   s   g | ]} | j qS r   )r"   r   )r   r   r   r     s    )r   
   T)eval_strr	   r   z2Expected at least {0} positional argument, got {1}z3Expected at least {0} positional arguments, got {1}z1Expected at most {0} positional argument, got {1}z2Expected at most {0} positional arguments, got {1}
positionalr   returnc                 S  s   g | ]	\}}}||fqS r   r   )ro   _r   r   r   r   r   r   4  s    c                 s  s"    | ]\}}|j ||jfV  qd S r&   )r$   r#   )ro   r   sfr   r   r   rp   6  s     )2help__func__r   helpallr   versionr    r]   rc   	mandatoryrh   r   r<   r=   joinre   requiresexcludessetkeysr   r"   inspectgetfullargspecmainsysversion_info	signaturevarargsmaxsizer   argsdefaultsr   ngettexthasattr_positional_validater   positional_varargsr   r   
parameters
annotationreturn_annotationr/   r0   evalr$   sortedr   )r'   r   r   requirements
exclusionsrk   gottenrh   missinginvalidmsigmax_argsmin_args
args_namesr   r   itemr   orderedr   )r'   r   r   _validate_args  s   



"	


zApplication._validate_argsc                   s   t |}ttt|t|D ]}|| dur& || || || ||< qt|t|krZdurL fdd|t|d D |t|d< |S |t|d |t|d< |S )z2Makes sure args follows the validation given inputNc                   s   g | ]	}  |qS r   )r   )ro   r   r'   
varargnamer   r   r   r   F  s    z4Application._positional_validate.<locals>.<listcomp>)r   rangeminr   r   )r'   r   validator_listr   argnamesr   out_argsir   r   r   r   :  s   z Application._positional_validatec              
   C  s  |du rt j}| | t|}| |d}d}z||\}}|||\}}W nK ty7   |  Y n t	yC   |
  Y nw tyO   |  Y nk tyu } zttd| ttd |  d}W Y d}~nId}~ww |D ]\}	}
|	|g|
R   qxd}|jr|jr|j| }t|j|}|s|jr|j\}}||_|j|dd\}}|r|  |du rd}|rt | dS ||fS )aW  
        Runs the application, taking the arguments from ``sys.argv`` by default if
        nothing is passed. If ``exit`` is
        ``True`` (the default), the function will exit with the appropriate return code;
        otherwise it will return a tuple of ``(inst, retcode)``, where ``inst`` is the
        application instance created internally by this function and ``retcode`` is the
        exit code of the application.

        .. note::
           Setting ``exit`` to ``False`` is intendend for testing/debugging purposes only -- do
           not override it in other situations.
        Nr   z
Error: {0}------r   Fexit)r   r   r   r   r   r   r   r   r   r   r   r    r   r   printr<   r=   r   CALL_MAIN_IF_NESTED_COMMANDr   	functoolspartialcleanuprl   rB   r   )r9   r   r   instretcoder   r   r   r   r   r   r   rv   r   r   r   rB   O  sN   



zApplication.runc                 O  s   | d}| |}|||\}}|D ]\}}||g|R   qd}	|jr(|jr4|j| }
t|j|
}	|
sJ|jrJ|j\}}||_|j	|dd\}}
|	rO|	  ||
fS )a  Invoke this application programmatically (as a function), in the same way ``run()``
        would. There are two key differences: the return value of ``main()`` is not converted to
        an integer (returned as-is), and exceptions are not swallowed either.

        :param args: any positional arguments for ``main()``
        :param switches: command-line switches are passed as keyword arguments,
                         e.g., ``foo=5`` for ``--foo=5``
        rH   NFr   )
_parse_kwd_argsr   r   r   r   r   r   r   rl   rB   )r9   r   switchesr   r   r   r   r   r   r   r   rv   r   r   r   r   invoke  s    



zApplication.invokec           	      C  s   i }t | dD ]S\}\}}tt| |}| j|jj }t|tr(t	|f}n+|j
r9t|ds9ttd||jsP|dddtfvrMttd|d}n|f}t|||||j< q	|S )	z7Parses keywords (positional arguments), used by invoke.r	   __iter__z(Switch {0} must be a sequence (iterable)TFNzSwitch {0} is a boolean flagr   )	enumerater   r3   rX   r]   rO   rh   r/   r
   r   r   r   r   r<   r=   r   r   r!   )	r'   r   r   r$   r"   r#   switch_localrk   pr   r   r   r     s"   
zApplication._parse_kwd_argsc                 G  sv   | j r3|rttd|d  ttd |   dS | js1ttd ttd |   dS dS ttd dS )z$Implement me (no need to call super)zUnknown sub-command '{0}'r   r   r	   zNo sub-command givenzmain() not implemented)r_   r   r<   r=   r   r   )r'   r   r   r   r   r     s   zApplication.mainc                 C  r   )zCalled after ``main()`` and all sub-applications have executed, to perform any necessary cleanup.

        :param retcode: the return code of ``main()``
        Nr   )r'   r   r   r   r   r     r   zApplication.cleanupz
--help-allr@   2Prints help messages of all sub-commands and quits)rg   groupr   c                 C  sz   |    t  | jr9t| j D ])\}}| | j d| }| |_|j	 D ]
}|j
dkr3d|_
q)|  qdS dS )r   r   r@   zHidden-switchesN)r   r   r_   r   r   r:   rP   rl   r]   rc   r   r   )r'   r+   subclsrv   sir   r   r   r     s   

zApplication.helpallz-hz--help"Prints this help message and quitsc                   sv    r  t  jrtj d  dd fdd  fdd}t \}}|j|D ]}t| q2tj	}|j
dd	 }|jrhtt|jD ]\}}d
|| d   d| d|| d < qP|jrt||j d d|}jp~j}	t|	tdB  j' jsjrtd_ntd_tjjtj|d W d	   n1 sw   Y  i }
j D ]}|j|
vrg |
|j< |
|j | qfdd}tdd ||
dD d }d}tt|t|d dd d}dd||j    }||
dD ]\}}}|j!}|j"r|td7 }|j#r$|td 7 }|j$r:|td!d"d#d |j$D 7 }|j%rP|td$d"d%d |j%D 7 }||&dd&d |' D }t(||j  |kro|}ndt||j  t(| d d }t|||B |||B  qjr7j)d' }t|td(B  t*j+ D ]\}}| |, }|jpt-|}j.r|r|d) nd*}|j.jj|d+7 }n|pd*}||&dd,d |' D }t(||j  |kr|}ndt||j  t(| d d }t/|j0rt1|j0}n|}t||j0||t|B  W d	   n	1 s0w   Y  qd	S d	S )-r  
c                 S  sT   d}|t | k r| | dkr|d7 }|t | k r| | dks| d| | |d fS )zIdentifies the initial indentation (all spaces) of the string and returns the indentation as well
            as the remainder of the line.
            r   r   r	   Nr   )sr   r   r   r   split_indentation  s
   z+Application.help.<locals>.split_indentationc                 3  s$   dd d fdd}|  ddD ]r}|\}}t|dkr5| E dH  dV  dd dqdd	 }d
d }||rz| E dH  ||rQ|dd }|| d}|t|k rs|| dkrs|d7 }|t|k rs|| dksc|d|  qs|| |qd | q| E dH  dS )a  Yields each paragraph of text along with its initial and subsequent indentations to be used by
            textwrap.TextWrapper.

            Identifies list items from their first non-space character being one of bullets '-', '*', and '/'.
            However, bullet '/' is invisible and is removed from the list item.

            :param text: The text to separate into paragraphs
            NrH   c                   3  s    r fV  dS dS )z%Yields the current result if present.Nr   r   initial_indent	paragraphsubsequent_indentr   r   current  s   z5Application.help.<locals>.paragraphs.<locals>.currentr  r   )rH   rH   rH   c                 S  s   g d}| d |v S )zBReturns true if the first element of 'line' is a bullet character.)rN   r.   r   r   r   )linebulletsr   r   r   is_list_item&  s   z:Application.help.<locals>.paragraphs.<locals>.is_list_itemc                 S  s   | d dkS )zJReturns true if the first element of 'line' is the invisible bullet ('/').r   r   r   )r  r   r   r   has_invisible_bullet+  s   zBApplication.help.<locals>.paragraphs.<locals>.has_invisible_bulletr	   r   )rn   splitr   )textr  partindentr  r  r  r   )r  r  r   
paragraphs  s@   
z$Application.help.<locals>.paragraphsc                 3  s`    | sdS t |d} | D ]\}}}t|||d}||}|E dH  t|dkr-dV  qdS )zYields each line of each paragraph of text after wrapping them on 'width' number of columns.

            :param text: The text to yield wrapped lines of
            :param width: The width of the wrapped output
            Nr	   )r  r
  r   rH   )maxr   wrapr   )r  widthr	  r  r
  rz   w)r  r   r   wrapped_paragraphsJ  s    


z,Application.help.<locals>.wrapped_paragraphsr	   N[r   ]z...r   zUsage:z=    {progname} [SWITCHES] [SUBCOMMAND [SWITCHES]] {tailargs}
z%    {progname} [SWITCHES] {tailargs}
)prognamer   c           	      3  s    t |  dd dD ]g\}}|r&|tv rt|n|}tj| |d B  t |dd dD ]> d fdd jD } jr]t	 jd	rL jj
}nt j}d
 j  d| }nd}|| } |j| fV  q.|rrt  qd S )Nc                 S  s   | d S )Nr   r   )r   r   r   r   rL     s    z3Application.help.<locals>.switchs.<locals>.<lambda>)key:c                 S  s   | j S r&   )re   )xr   r   r   rL     rM   , c                 3  s@    | ]}| j v r j | krt|d krdnd| V  qdS r   )r\   r   r   )r'   r  r   r   rp     s    
z4Application.help.<locals>.switchs.<locals>.<genexpr>r   r   rH   )r   r   _switch_groupsr<   r   rZ   r   re   r   r   r   r0   argnameupperrY   )		by_groupsshow_groupsgrpswinfoslgrpswnamestypenamer   prefixr;   )r  r   switchs  s*   

z!Application.help.<locals>.switchsc                 s  s    | ]
\}}}t |V  qd S r&   r   )ro   r  r+  colorr   r   r   rp     s    z#Application.help.<locals>.<genexpr>F   z    {0}{1}{2}<   2      )r  Tz; may be given multiple timesz
; requiredz; requires {0}r   c                 s  r   r   r   ro   r   r   r   r   rp     
    
z; excludes {0}c                 s  r   r   r   r2  r   r   r   rp     r3  c                 s      | ]}|  V  qd S r&   stripro   lnr   r   r   rp         zSub-commandszSub-commands:z; rH   )rl   subc                 s  r4  r&   r5  r7  r   r   r   rp     r9  )2_get_prog_versionr   r   rW   r6  r   DESCRIPTION_MOREr   r   r   r   r   r   r`   r   r   r   COLOR_USAGE_TITLEr[   r<   USAGEr_   r=   r   rU   rP   r]   rc   r   r  r   r   r  r   r   r   r   r   r  
splitlinesr   rZ   r   r   r:   r   SUBCOMMAND_HELPMSGcontains_colorsr+   rV   )r'   r  colsr   r  r   r   r   dutcr$  r  r,  sw_widthdescription_indentrz   indentationswitch_infor+  r-  help_txtmsgpaddinggcr+   r  rv   dochelp_str	bodycolorr   )r  r'   r  r   r     s   	D

(







 


 zApplication.helpc                 C  s:   d }| }|d urt |dd }|d ur|S |j}|d us|S )NVERSION)r3   rl   )r'   vercurrr   r   r   r;    s   zApplication._get_prog_versionz-vz	--version&Prints the program's version and quitsc                 C  s4   |   }|dur
|ntd}t| j d|  dS )rS  Nz(version not set)r   )r;  r<   r   rP   )r'   rQ  ver_namer   r   r   r     s   zApplication.versionr&   )NT)-r   r   r   __doc__rP   rW   r<  rP  r>  r[   r=  rY   rZ   r   r<   r@  r   rl   r   rf   rD   r(   propertyrm   classmethodrs   r{   r   r   r   staticmethodr   r   r   rB   r   r   r   r   r   r   r   r;  r   __classcell__r   r   rF   r   rA   S   s    GA

	 

o=


 u
rA   ),
__future__r   r   r   rQ   r   collectionsr   textwrapr   plumbumr   r   plumbum.cli.i18nr   plumbum.libr   r   r
   r   r   r   r   r   r   r   r   r   r   terminalr   r   _translationgettextr   r<   r   r   r    r!   r*   r!  _switch_groups_l10nrA   r   r   r   r   <module>   s,    4	